<template lang="html">
  <div class="mall-layout-main">
    <div class="goodDetail_detail">
      <div class="Classify_classify">
        <el-breadcrumb separator-class="el-icon-arrow-right">
          <el-breadcrumb-item>活动管理</el-breadcrumb-item>
          <el-breadcrumb-item>活动列表</el-breadcrumb-item>
          <el-breadcrumb-item>活动详情</el-breadcrumb-item>
        </el-breadcrumb>
      </div>
      <div class="ant-spin-nested-loading">
        <div class="ant-spin-container">
          <div class="goodDetail_detail-opt__B9Fgp">
            <div class="goodDetail_detail-opt-left__hkEJv">
              <div class="pics">
                <div >
                  <div class="pics__img_wrap">
                    <PicZoom :url="mainImgUrl" :scale="3" class="pic-move"  style="width: 100%; height: 100%"></PicZoom>
                  </div>


                  <div class="recommendPage">
                    <swiper
                      :options="swiperOption"
                      ref="mySwiper"
                      class="swiper-wrapper"
                    >
                      <swiper-slide v-for="(i, index) in imgUrlList" :key="index"
                        ><img
                          :src="i"
                          alt=""
                          width="47px"
                          height="47px"
                          style="box-sizing: border-box; cursor: pointer"
                          :class="{ swiperActive: activeIn == index }"
                          @click="changeImg(i, index)"
                      /></swiper-slide>
                    </swiper>
                    <div class="swiper-left" >
                      <i class="el-icon-arrow-left"></i>
                    </div>
                    <div class="swiper-left" style="right: 0;">
                      <i class="el-icon-arrow-right"></i>
                    </div>
                  </div>
                </div>
              </div>
              <div class="goodDetail_detail-opt-left-hot__8WZKT">
                热度 &nbsp;&nbsp;1710
              </div>
            </div>
            <div class="GoodsSelect_select__A6Prg select">
              <div class="GoodsSelect_select__title__QIpRr">
                {{detialdata.goods_name}}
              </div>
              <div class="ant-spin-nested-loading">
                <div class="ant-spin-container">
                  <el-form class="GoodsSelect_select-list" ref="form" :model="form" label-width="80px">
                    <el-form-item label-width="80px" style="min-height: 110px;" v-if="false">
                      <div class="seckill-sku">
                        <div class="seckill-sku-top"></div>
                        <div class="seckill-sku-bottom">
                          <div class="seckill-sku-bottom-price">
                            <span class="tax-txt">税前价：</span>
                            <span class="tax-price">
                              <span class="symbol">¥</span>220
                            </span>
                            <span class="org-price">¥230</span>
                          </div>
                          <div class="seckill-sku-bottom-stock">
                            仅剩200件
                          </div>
                        </div>
                      </div>
                    </el-form-item>

                    
                    <div class="">
                      <div class="type" v-for="(item,i) in sku" :key="i">
                        <div class='type_name '>{{item.group_name}}</div>
                        <div class="type_content">
                          <div :class="['type_info',sku.checked ? 'act' : '',sku.disabled ? 'disabled' : '']"
                               @click=" sku.disabled ? '' : onSwitchSpec($event,i,sku.item_id)" v-for="(sku,j) in item.spec_items" :key="j"
                               :data-attrIdx="i" :data-itemIdx="sku.item_id">
                            {{sku.spec_value}}{{item.group_name=="数量" ? unit:""}}
                          </div>
                        </div>
                      </div>
                    </div>
        
                    
                    

                    <!-- <el-form-item label="配送至" class="GoodsBtn_goods-btn__fkHhw select-item-form">
                      <el-cascader
                        v-model="value"
                        :options="regionData"
                        @change="handleChange"
                        clearable>
                      </el-cascader>
                    </el-form-item> -->

                    <div class="address pub">
                      <div class="titl">配送地址</div>
                      <div class="addre">
                        <el-col :span="24">
                          <el-select v-model="cityOne" placeholder="请选择省" @change="oneCity" class="addre">
                            <el-option
                              v-for="(item,index) in opt"
                              :key="index"
                              :label="item.region_name"
                              :value="index">
                            </el-option>
                          </el-select>
                          <el-select v-model="cityTwo" placeholder="请选择市" @change="twoCity" class="addre">
                            <el-option
                              v-for="(item,index) in twoArr"
                              :key="index"
                              :label="item.region_name"
                              :value="index">
                            </el-option>
                          </el-select>
                          <el-select v-model="cityThree" placeholder="请选择区/县" @change="threeCity" class="addre">
                            <el-option
                              v-for="(item,index) in threeArr"
                              :key="index"
                              :label="item.region_name"
                              :value="index">
                            </el-option>
                          </el-select>
                        </el-col>
        
                      </div>
                    </div>
                    <!-- <el-form-item label="发货" class="GoodsBtn_goods-btn__fkHhw select-item-form">
                      <div class="GoodsSelect_delivery-desc__WoG6V">1个工作日</div>
                    </el-form-item> -->
                    <el-form-item label="服务保障" class="GoodsBtn_goods-btn__fkHhw select-item-form">
                      <div class="baozhang-box">
                        <div v-for="item in 3" class="baozhang-box-item">
                          <i class="el-icon-success" style="margin-right: 5px;"></i>
                          <span>服务保障</span>
                        </div>
                      </div>
                    </el-form-item>
                    <div class="count-form-item">
                      <div class="nub-box">
                        <el-input-number :min="1" v-model="num" @change="handleChange"></el-input-number>
                      </div>
                      <div class="wholesale">
                        <div class="Count_sku-count-price__9-Y5u">总价：
                          <div  v-if="detailtype =='一般贸易'" class="Count_sku-count-price-all__Uh">￥{{(Number(goods_total_price && parseFloat(goods_total_price).toFixed(2))) + (Number(freightForm && freightForm.freightMoney)) }}
                          </div>
                          <div v-else class="Count_sku-count-price-all__Uh">￥{{(Number(goods_total_price && parseFloat(goods_total_price).toFixed(2))) + (Number(freightForm && freightForm.freightMoney)) + Number(taxationFee)}}
                          </div>
                          <div>到手单价：</div>
                          <div  v-if="detailtype =='一般贸易'">￥{{(Number(goods_total_price && parseFloat(goods_total_price).toFixed(2))) + (Number(freightForm && freightForm.freightMoney)) }}</div>
                          <div v-else>￥{{(Number(goods_total_price && parseFloat(goods_total_price).toFixed(2))) + (Number(freightForm && freightForm.freightMoney)) + Number(taxationFee)}}</div>
                          <div>
                            <span class="yf" style="display: flex;">
                              <span>(运费:</span>
                              <span>￥{{freightForm && freightForm.freightMoney}}</span>
                              <div v-if="detailtype !='一般贸易'">
                                <span class="taxationFee" style="margin-left: 15px">税费：</span>
                                <span class="taxationFee">￥{{taxationFee}}</span>
                              </div>
                              )
                            </span>
                          </div>
                        </div>
                        
                        <span>若有其他疑问，点击<a href="" style="color: #656efe;">联系客服></a></span>
                      </div>
                    </div>
                    <div v-if="selectSku==''" class="nobox">
                        <div class="dgx">
                            正在备货中
                        </div>
                    </div>
                    <div v-else class="OrderBtns_order-btns__ZxQOL">
                      <el-button type="primary" @click="num==''?$notifyError(`请添加购买数量`):goTo(`/index/confirm?goods_id=${detail.id}&goods_num=${num}&goods_sku_id=${selectSku}`)">立即下单</el-button>
                      <el-button  @click="addShopping">加入购物车</el-button>
                    </div>

                    
                  </el-form>
                </div>
              </div>
            </div>
          </div>
          <div class="goodDetail_detail-info__fqY6f">
            <div class="RecommeGoods_recomme__E99RU">
              <div class="RecommeGoods_recomme__title__LiEXB">
                <img src="	https://static.xyb2b.com/images/138004501bb8a9a9e131f2a843f62c86.png" alt="">
                其他推荐商品
              </div>
              <div class="RecommeGoods_recomme-list__qgfb-">
                <el-carousel height="800px" indicator-position="none" arrow="never">
                  <el-carousel-item>
                    <div class="ClassifyNavHotSell_hot-sell-list__u5XKI">
                      <div class="smallGoodsItem" v-for="item in 10">
                          <div class="smallGoodsItem-item">
                              <div class="smallGoodsItem-item-top">
                                  <div class="lazyload-wrapper" style="width: 73px;height: 63px;">
                                      <img style="width: 63px;height: 63px;" src="../../assets/img/index/good01.png" alt="">
                                  </div>
                                  <div class="smallGoodsItem-item-info">
                                      <span class="smallGoodsItem-item-info-title">法国MAKE UP FOR EVER玫珂菲 定妆喷雾 100ml</span>
                                      <span class="smallGoodsItem-item-info-price">
                                          <span class="price-type">￥ 198</span>
                                      </span>
                                  </div>
                              </div>
                          </div>
                      </div>
                  </div>
                  </el-carousel-item>
                </el-carousel>
              </div>
            </div>
            <div class="DetailInfo_detail-info__IYg6w">
              <div>
                <el-tabs v-model="activeName" @tab-click="tabshandleClick">
                  <el-tab-pane label="详情介绍" name="first">
                    <ul class="DetailInfo_detail-info-list__SX86c">
                      <li class="DetailInfo_detail-info-item__GhmeQ">
                        <div class="DetailInfo_detail-info-item__title__hY5u1">
                          <span>商品属性</span>
                        </div>
                        <div class="GoodsAttr_attr__pkPqn">
                          <ul class="GoodsAttr_attr-list__8Qg55">
                            <li class="GoodsAttr_attr-item__m5sgz">
                              <span class="GoodsAttr_attr-item__title__M9FQN">有效期</span>
                              <div class="GoodsAttr_attr-item-custom__Fq1gp">
                                <span>24年05月01日</span>
                              </div>
                            </li>
                            <li class="GoodsAttr_attr-item__m5sgz">
                              <span class="GoodsAttr_attr-item__title__M9FQN">国际条码</span>
                              <div class="GoodsAttr_attr-item-custom__Fq1gp">
                                <span>76314306466</span>
                              </div>
                            </li>
                            <li class="GoodsAttr_attr-item__m5sgz">
                              <span class="GoodsAttr_attr-item__title__M9FQN">原产地</span>
                              <div class="GoodsAttr_attr-item-custom__Fq1gp">
                                <span>美国</span>
                              </div>
                            </li>
                            <li class="GoodsAttr_attr-item__m5sgz">
                              <span class="GoodsAttr_attr-item__title__M9FQN">商品货号</span>
                              <div class="GoodsAttr_attr-item-custom__Fq1gp">
                                <span>20000062980-K</span>
                              </div>
                            </li>
                            <li class="GoodsAttr_attr-item__m5sgz">
                              <span class="GoodsAttr_attr-item__title__M9FQN">SKU编码</span>
                              <div class="GoodsAttr_attr-item-custom__Fq1gp">
                                <span>20000062980-K</span>
                              </div>
                            </li>
                            <li class="GoodsAttr_attr-item__m5sgz">
                              <span class="GoodsAttr_attr-item__title__M9FQN">单位重量</span>
                              <div class="GoodsAttr_attr-item-custom__Fq1gp">
                                <span>0.00kg</span>
                              </div>
                            </li>
                            <li class="GoodsAttr_attr-item__m5sgz">
                              <span class="GoodsAttr_attr-item__title__M9FQN">发货地</span>
                              <div class="GoodsAttr_attr-item-custom__Fq1gp">
                                <span>金华市发货</span>
                              </div>
                            </li>
                          </ul>
                        </div>
                      </li>
                      <li class="DetailInfo_detail-info-item__GhmeQ">
                        <div class="DetailInfo_detail-info-item__title__hY5u1">
                          <span>图文详情</span>
                        </div>
                        <div class="rich-text-component">
                          <div v-html=" detail && detail.content"></div>
                        </div>
                      </li>
                    </ul>
                  </el-tab-pane>
                  <el-tab-pane label="购买说明" name="second">
                    <div class="img" style="width: 100%">
                        <img src="../../assets/img/index/xqsh.jpg" style="width: 100%" />
                    </div>
                    <div class="" v-if=" detail && detail.trade_type_name == '一般贸易'">
                        <ul class="show-notes-text">
                            <li>
                                <p><span>1&nbsp;</span><span>）商品本身可能无中文标签，您可以查看网站的翻译或者在线联系我们的客服；</span></p>
                                <p><span>2&nbsp;</span><span>）同商品可能涉及到不同的仓库，因发货仓库不同，货物配送到您手中的时效会稍有区别，请以实际为准；</span></p>
                                <p>
                                    <span>3&nbsp;</span><span>）您确保订单中的收货地址、收件人姓名、手机号码等各项信息的准确性和有效性，以便商品及时、准确地发出，并随时查看个人账户</span>&nbsp;<span>里“我的订单”的订单状态更新情况；</span>
                                </p>
                                <p>
                                    <span>4&nbsp;</span><span>）送货过程中如果快递员联络您未及时得到回复，此订单将被默认为您已经放弃订购，由此产生的费用或其他后果由您自行承担；</span>
                                </p>
                                <p>
                                    <span>5&nbsp;</span><span>）商品不支持任何无理由退换货，不支持无理由拒收，此类商品如果被拒收或退回，将扣除</span><span>50%</span><span>的订单总金额，请您务必收到货时在快递员见证下先拆包检查。</span>&nbsp;<span>清仓商品主要是客户退换货的商品，请慎拍。有问题的及时拒收并联系客服处理，没问题再签收！（其他售后问题请参考帮助中心的售后服务）。</span>
                                </p>
                                <p>
                                    <span>6）</span><span>请您确保您在知品屋平台所使用的消费者身份信息在整个购买及收货过程中持续真实、合法、有效；并且您承诺不以任何形式在知品屋平台刷单，不利用知品屋平台进行任何违法活动。</span>
                                </p>
                                <p><span><br></span></p>
                                <p><span>7）请您确保不以任何形式在线上线下留存/销售跨境商品。</span></p>
                                <p><span>8）您知晓并同意知品屋平台有权在您违反本承诺保证时，对您处以暂停服务、关停账户等处罚措施并有权要求您赔偿因违反本承诺保证对知品屋平台造成的全部损失。</span>
                                </p>
                                <p>
                                    <span><span>9）</span><span>国家药监局提示您：</span><span>请正确认识化妆品功效，化妆品不能替代药品，不能治疗皮肤病等疾病。</span></span>
                                </p>
                            </li>
                        </ul>
                    </div>
                    <div class="" v-if="detail && detail.trade_type_name == '保税'">
                        <ul class="show-notes-text">
                            <li ng-bind-html="Purchasecontent" class="ng-binding">
                                <p><span>a</span><span>）什么是保税区？</span></p>
                                <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>保税区是海关设置的或经海关批准注册、受海关监督和管理的可以较长时间存储商品的区域。（保税区能便利转口贸易，增加有关费用的收入。</span>&nbsp;<span>外国商品存入保税区，不必缴纳进口关税，尚可自由出口，只需交纳存储费和少量费用，但如果要进入关境则需交纳关税。）</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>b</span><span>）知品屋的商品都是正品吗？</span></p>
                                <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>平台上所有产品都是供应商海外原装进口，海关监管并检验，保税区直接发货到用户手上，并且每个商品进驻海关保税区，都需要做商检，以确保商品是正品。</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>c</span><span>）保税订单什么时候发货，多久到货？</span></p>
                                <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>一般正常情况下，客户会在下单后</span><span>3-7</span><span>个工作日左右收到货，我们推单的时候会综合考虑保税仓的库存、发货速度以及价格等因素，优先推送合适的保税区。正常情况下运单号会在</span><span>48</span><span>小时之内出，随后按照正常的物流运转时间到客户手上。</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>d</span><span>）是否支持退货？</span></p>
                                <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>由于跨境购物自身的特殊性（物流距离，耗时较长，商品退换货出关时存在税费及清关障碍等问题），所售商品不支持任何无理由退换货，不支持无理由拒收。此类商品如果被拒收或退回，将扣除订单总金额</span><span>50%</span><span>的手续费。请您务必当场验收，有问题请拍照拒收并在售后规定时间内联系客服处理，没问题再签收！（其他售后问题请参考帮助中心的售后服务）。</span>
                                </p>
                                <p><span>补充说明：</span></p>
                                <p>
                                    <span>1&nbsp;</span><span>）根据财政部，海关总署，国家税务总局规定，参照中华人民共和国财政部关税【</span><span>2018</span><span>】49</span><span>号《关于完善跨境电子商务零售进口税收政策的通知》要求，跨境电</span><span>子商务零售进口商品的单次交易限值为人民币5</span><span>000</span><span>元，个人年度交易限值为人民币</span><span>26000</span><span>元。在限值以内进口的跨境电子商务零售进口商品，进口环节增值</span><span>税、消费税取消免征税额，暂按法定应纳税额的</span><span>70%</span><span>征收。对于违反上述规定的系统将给予退单；</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>2&nbsp;</span><span>）同商品可能涉及到不同的仓库，因发货仓库不同，货物配送到您手中的时效会稍有区别，请以实际为准；</span></p>
                                <p><span>&nbsp;</span></p>
                                <p><span>3&nbsp;</span><span>）请您确保订单中的收货地址、收件人姓名、收件人身份证号码、手机号码等各项信息的准确性和有效性，以便商品及时、准确地发出，并随时查看个人账户里“我的订单”，关注订单状态更新情况；</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>4&nbsp;</span><span>）如因收货人个人原因导致货物退回，由此产生的费用或其他后果由客户自行承担。</span></p>
                                <p>
                                    <span>5 </span><span>）请您确保您在知品屋平台所使用的消费者身份信息在整个购买及收货过程中持续真实、合法、有效；并且您承诺不以任何形式在知品屋平台刷单，不利用知品屋平台进行任何违法活动。</span>
                                </p>
                                <p><span>6</span><span>）所有跨境商品仅限于个人自用，可能由于与国际标准不同而存在风险，不得进行再次销售。</span></p>
                                <p><span>7</span><span>）您知晓并同意知品屋平台有权在您违反本承诺保证时，对您处以暂停服务、关停账户等处罚措施并有权要求您赔偿因违反本承诺保证对知品屋平台造成的全部损失。</span>
                                </p>
                                <p><span>8）跨境婴幼儿奶粉按照国际标准生产，其蛋白质含量可能低于国内标准，长期喂食会造成婴幼儿蛋白质摄入不足，建议及时补充肉类或鱼类辅食。</span></p>
                                <p><span><span>9）</span><span><span>国家药监局提示您</span>：</span><span>请正确认识化妆品功效，化妆品不能替代药品，不能治疗皮肤病等疾病。</span></span>
                                </p>
                            </li>
                        </ul>
                    </div>
                    <div class="" v-if="detail &&  detail.trade_type_name == '直邮'">
                        <ul class="show-notes-text">
                            <li ng-bind-html="Purchasecontent" class="ng-binding">
                                <p><span>a</span><span>）海外直邮商品都是正品吗？</span></p>
                                <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>平台上所有产品都是供应商海外原装进口，海关监管并检验，并且每个商品进驻海关保税区，都需要做清关，以确保商品是正品。</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>b</span><span>）是否支持退货？</span></p>
                                <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>由于跨境购物自身的特殊性（物流距离，耗时较长，商品退换货出关时存在税费及清关的障碍等）所售商品不支持任何无理由退换货，不支持无理由拒收，此类商品如果被拒收或退回，将扣除</span><span>50%</span><span>的订单总金额，请您务必收到货时在快递员见证下先拆包检查，</span>&nbsp;<span>有问题的及时拒收并联系客服处理，没问题再签收！（其他售后问题请参考帮助中心的售后服务）。</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>c</span><span>）为什么有运单号但一直没有物流信息？</span></p>
                                <p>
                                    <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>一般情况下，接收到您的单子之后会在</span><span>48</span><span>小时内出运单号，然后将您的个人信息以及运单号一起提交海关审核，等海关审核结束后会进入正常的物流运转。</span>
                                </p>
                                <p><span><br></span></p>
                                <p><span>补充说明：</span></p>
                                <p>
                                    <span>1&nbsp;</span><span>）您在知品屋网站上购买的跨境商品为产地直销，商品直接进入试点城市保税仓，接受海关监管，为消费者直接在海外购买购买商品；</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p>
                                    <span>2&nbsp;</span><span>）您在知品屋网站购买境外商品时，自动视为同意由知品屋代您向中国海关进行申报和代缴税款。因此在下单前需提供您的姓名和身份证号码进行实名身份信息</span>&nbsp;<span>注册认证；</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span>3&nbsp;</span><span>）商品本身可能无中文标签，您可以查看网站的翻译或者在线联系我们的客服；</span></p>
                                <p><span>&nbsp;</span></p>
                                <p><span>4&nbsp;</span><span>）您购买的境外商品适用的品质，健康，标识等项目使用标准符合原产国使用标准，但是可能与我国标准有所不同，所以在使用过程中由此可能产生的危害</span>&nbsp;<span>或损失以及其他风险，由您个人承担。</span>
                                </p>
                                <p><span>&nbsp;</span></p>
                                <p><span></span></p>
                                <p>
                                    <span>5 </span><span>）请您确保您在知品屋平台所使用的消费者身份信息在整个购买及收货过程中持续真实、合法、有效；并且您承诺不以任何形式在知品屋平台刷单，不利用知品屋平台进行任何违法活动。</span>
                                </p>
                                <p><span>6</span><span>）所有跨境商品仅限于个人自用，可能由于与国际标准不同而存在风险，不得进行再次销售。</span></p>
                                <p><span>7</span><span>）您知晓并同意知品屋平台有权在您违反本承诺保证时，对您处以暂停服务、关停账户等处罚措施并有权要求您赔偿因违反本承诺保证对知品屋平台造成的全部损失。</span>
                                </p>
                                <p><span>8）跨境婴幼儿奶粉按照国际标准生产，其蛋白质含量可能低于国内标准，长期喂食会造成婴幼儿蛋白质摄入不足，建议及时补充肉类或鱼类辅食。</span></p>
                                <p>
                                    <span>9<span>）</span></span><span><span>国家药监局提示您</span>：</span><span>请正确认识化妆品功效，化妆品不能替代药品，不能治疗皮肤病等疾病。</span>
                                </p>
                            </li>
                        </ul>
                    </div>
                  </el-tab-pane>
                </el-tabs>
              </div>
              <div></div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <homefooter></homefooter>
    
</div>
<!-- <div class="detail">
    <div class='conten' v-loading="loading">
      <div class='title'>所有商品>{{ detail && detail.goods_name}}</div>
      <div class='displa clearfix' v-if="detail">
        <div class="displa_left">
          <div class="displa_left_top">
            <div class="swiper-container gallery-top">
              <div class="swiper-wrapper">
                <img class="swiper-slide" v-for="(item,index) in JSON.parse(detail.images)" :key="index" :src="item"/>
              </div>
            </div>
          </div>
          <div class="displa_left_buttom">
            <div class="button-prev but-button" @click='slideTo("prev")'>
              <img src="../../assets/img/index/arrowleft.png" alt="">
            </div>
            <div class="swiper-container gallery-thumbs">
              <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="(item,index) in JSON.parse(detail.images)" :key="index"
                     :style="{backgroundImage: 'url('+item+')'}"></div>

              </div>
            </div>
            <div class="button-next but-button" @click='slideTo("next")'>
              <img src="../../assets/img/index/arrowright.png" alt="">
            </div>
          </div>
        </div>
        <div class="displa_right">
          <div class='right_info'>
            <div class="name pub">
              <span class="commodity_type" v-if="detail.trade_type_name=='一般贸易'">{{detail.trade_type_name}}</span>
              <span class="commodity_type commodity_type1" v-if="detail.trade_type_name=='保税'">{{detail.trade_type_name}}</span>
              <span class="commodity_type commodity_type2" v-if="detail.trade_type_name=='直邮'">{{detail.trade_type_name}}</span>
              {{detail.goods_name}}
            </div>
            <div class="price pub">
              <div class="are" v-if="min_price.toFixed(2)!=max_price.toFixed(2)">
                ￥{{min_price.toFixed(2)}} ~ ￥{{max_price.toFixed(2)}}
                <span class="proposal">市场零售价：￥{{detail.mkt_price}}</span>
              </div>

              <div class="are" v-else>￥{{min_price.toFixed(2)}}
                <span class="proposal">市场零售价：￥{{detail.mkt_price}}</span></div>

              <span class="money">折合单价：</span>
              <span class="money">￥{{(skuPrice/skuNum).toFixed(2)}}</span>
            </div>
            <div class="activ" v-if="detail.is_activity==1 && selectSku!=''">
              <div :class="['one',activeAct==1?'isAct':'',generalProductLifeList.length==0?'isa':'']" @click="changPro(1)"  v-if="activityProductLifeList.length>0">
                <div :class="[activeAct!=1?'ac':'']">促销</div>
                <div>促销规格</div>
              </div>
              <div :class="['two',activeAct==0?'isAct':'']" @click="changPro(0)" v-if="generalProductLifeList.length>0">常规规格</div>
            </div>
            <div class="address pub">
              <div class="titl">配送地址</div>
              <div class="addre">
                <el-col :span="24">
                  <el-select v-model="cityOne" placeholder="请选择省" @change="oneCity" class="addre">
                    <el-option
                      v-for="(item,index) in opt"
                      :key="index"
                      :label="item.region_name"
                      :value="index">
                    </el-option>
                  </el-select>
                  <el-select v-model="cityTwo" placeholder="请选择市" @change="twoCity" class="addre">
                    <el-option
                      v-for="(item,index) in twoArr"
                      :key="index"
                      :label="item.region_name"
                      :value="index">
                    </el-option>
                  </el-select>
                  <el-select v-model="cityThree" placeholder="请选择区/县" @change="threeCity" class="addre">
                    <el-option
                      v-for="(item,index) in threeArr"
                      :key="index"
                      :label="item.region_name"
                      :value="index">
                    </el-option>
                  </el-select>
                </el-col>

              </div>
            </div>
            <div class="">
              <div class="type" v-for="(item,i) in sku" :key="i">
                <div class='type_name '>{{item.group_name}}</div>
                <div class="type_content">
                  <div :class="['type_info',sku.checked ? 'act' : '',sku.disabled ? 'disabled' : '']"
                       @click=" sku.disabled ? '' : onSwitchSpec($event,i,sku.item_id)" v-for="(sku,j) in item.spec_items" :key="j"
                       :data-attrIdx="i" :data-itemIdx="sku.item_id">
                    {{sku.spec_value}}{{item.group_name=="数量" ? unit:""}}
                  </div>
                </div>
              </div>
            </div>

            <div class="number pub">
              <div class='number_name'>数量</div>
              <div class="number_info">

                <input v-model="num" class='num' min="1" :max="stock_num" v-on:input="numIn()"
                       onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"/>
                <div class='add_reduce'>
                  <div class="add" v-if=" !btnShow">+</div>
                  <div class="add" v-else @click="modinfyNum('add')">+</div>
                  <div class="reduce" v-if=" !btnShow">-</div>
                  <div class="reduce" v-else @click="modinfyNum('reduce')">-</div>
                </div>
                <span>件</span>
              </div>
              <div style="clear:both"></div>
            </div>
            <div class="link-top pub"></div>
            <div class="total_price">
              <div style="display: flex;align-items: center">
                <span v-if="detail.trade_type_name !='一般贸易'">含税价：</span>
                <span v-else>总价：</span>
                <span class='zj'>
                  ￥{{goods_total_price && parseFloat(goods_total_price).toFixed(2)}}
                </span>
                <span class="yf">
                  <span>(运费:</span>
                  <span>￥{{freightForm && freightForm.freightMoney}}</span>
                  <div  v-if="detail.trade_type_name !='一般贸易'">
                    <span class="taxationFee" style="margin-left: 15px">税费:</span>
                    <span class="taxationFee">￥{{taxationFee}}</span>
                  </div>
                  )
                </span>
              </div>
            </div>
            <div class="purchase" v-loading="!nmShow">
              <div class="dgx" v-if="selectSku==''">
                正在备货中
              </div>
              <template v-if="selectSku!=''">
                <div class="dg"
                     @click="num==''?$notifyError(`请添加购买数量`):goTo(`/index/order/balance?goods_id=${detail.id}&goods_num=${num}&goods_sku_id=${selectSku}`)">
                  立即代购
                </div>
                <div class="jhd" id="jhd" @click="addShopping">
                  <img src="../../assets/img/index/hong.png">
                  加入购物车
                </div>
              </template>

<transition v-on:before-enter="beforeEnter" v-on:enter="enter" v-on:after-enter="afterEnter">
    <img class="add_img_js" v-if="addShow1" :src="detail.big_img" alt="">
</transition>
</div>
</div>
<div class='recommend'>
    <div class='recommend_title'>商品推荐</div>
    <div class='recommend_swiper'>
        <div class="swiper-container gallery-right">
            <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="item in detail.recommend_list" @click="goTo(`/index/commodity/detail?id=${item.id}`,'detail')">
                    <div class='bg_img' :style="{backgroundImage: 'url('+item.small_img+')'}"></div>
                    <span>￥{{item.goods_price}}</span>
                </div>
            </div>
        </div>
    </div>
    <div class='recommend_button'>
        <div class='button_main'>
            <div :class="['recommend_button_prev']" @click='rightGoto("prev")'></div>
            <div :class="['recommend_button_next']" @click='rightGoto("next")'></div>
        </div>
    </div>
</div>
</div>
</div>
<div class="tab" id="tab" ref="test" v-if="!loading">
    <button :class="['tablinks',act == 'one' ? 'active' : '']" @click="openCity($event, 'one')">商品详情
        </button>
    <button :class="['tablinks',act == 'two' ? 'active' : '']" @click="openCity($event, 'two')">购买须知
        </button>
</div>
<div class='displa_info' id="displa_info" v-if="!loading">
    <div id="one" class="tabcontent">

        <div class="shopDetails" v-html=" detail && detail.content"></div>
    </div>
    <div id="two" class="tabcontent">
        <div class="tabcontentTitle">
            购买须知
        </div>
        <div class="img" style="width: 100%">
            <img src="../../assets/img/index/xqsh.jpg" style="width: 100%" />
        </div>
        <div class="" v-if=" detail && detail.trade_type_name == '一般贸易'">
            <ul class="show-notes-text">
                <li>
                    <p><span>1&nbsp;</span><span>）商品本身可能无中文标签，您可以查看网站的翻译或者在线联系我们的客服；</span></p>
                    <p><span>2&nbsp;</span><span>）同商品可能涉及到不同的仓库，因发货仓库不同，货物配送到您手中的时效会稍有区别，请以实际为准；</span></p>
                    <p>
                        <span>3&nbsp;</span><span>）您确保订单中的收货地址、收件人姓名、手机号码等各项信息的准确性和有效性，以便商品及时、准确地发出，并随时查看个人账户</span>&nbsp;<span>里“我的订单”的订单状态更新情况；</span>
                    </p>
                    <p>
                        <span>4&nbsp;</span><span>）送货过程中如果快递员联络您未及时得到回复，此订单将被默认为您已经放弃订购，由此产生的费用或其他后果由您自行承担；</span>
                    </p>
                    <p>
                        <span>5&nbsp;</span><span>）商品不支持任何无理由退换货，不支持无理由拒收，此类商品如果被拒收或退回，将扣除</span><span>50%</span><span>的订单总金额，请您务必收到货时在快递员见证下先拆包检查。</span>&nbsp;<span>清仓商品主要是客户退换货的商品，请慎拍。有问题的及时拒收并联系客服处理，没问题再签收！（其他售后问题请参考帮助中心的售后服务）。</span>
                    </p>
                    <p>
                        <span>6）</span><span>请您确保您在知品屋平台所使用的消费者身份信息在整个购买及收货过程中持续真实、合法、有效；并且您承诺不以任何形式在知品屋平台刷单，不利用知品屋平台进行任何违法活动。</span>
                    </p>
                    <p><span><br></span></p>
                    <p><span>7）请您确保不以任何形式在线上线下留存/销售跨境商品。</span></p>
                    <p><span>8）您知晓并同意知品屋平台有权在您违反本承诺保证时，对您处以暂停服务、关停账户等处罚措施并有权要求您赔偿因违反本承诺保证对知品屋平台造成的全部损失。</span>
                    </p>
                    <p>
                        <span><span>9）</span><span>国家药监局提示您：</span><span>请正确认识化妆品功效，化妆品不能替代药品，不能治疗皮肤病等疾病。</span></span>
                    </p>
                </li>
            </ul>
        </div>
        <div class="" v-if="detail && detail.trade_type_name == '保税'">
            <ul class="show-notes-text">
                <li ng-bind-html="Purchasecontent" class="ng-binding">
                    <p><span>a</span><span>）什么是保税区？</span></p>
                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>保税区是海关设置的或经海关批准注册、受海关监督和管理的可以较长时间存储商品的区域。（保税区能便利转口贸易，增加有关费用的收入。</span>&nbsp;<span>外国商品存入保税区，不必缴纳进口关税，尚可自由出口，只需交纳存储费和少量费用，但如果要进入关境则需交纳关税。）</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>b</span><span>）知品屋的商品都是正品吗？</span></p>
                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>平台上所有产品都是供应商海外原装进口，海关监管并检验，保税区直接发货到用户手上，并且每个商品进驻海关保税区，都需要做商检，以确保商品是正品。</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>c</span><span>）保税订单什么时候发货，多久到货？</span></p>
                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>一般正常情况下，客户会在下单后</span><span>3-7</span><span>个工作日左右收到货，我们推单的时候会综合考虑保税仓的库存、发货速度以及价格等因素，优先推送合适的保税区。正常情况下运单号会在</span><span>48</span><span>小时之内出，随后按照正常的物流运转时间到客户手上。</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>d</span><span>）是否支持退货？</span></p>
                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>由于跨境购物自身的特殊性（物流距离，耗时较长，商品退换货出关时存在税费及清关障碍等问题），所售商品不支持任何无理由退换货，不支持无理由拒收。此类商品如果被拒收或退回，将扣除订单总金额</span><span>50%</span><span>的手续费。请您务必当场验收，有问题请拍照拒收并在售后规定时间内联系客服处理，没问题再签收！（其他售后问题请参考帮助中心的售后服务）。</span>
                    </p>
                    <p><span>补充说明：</span></p>
                    <p>
                        <span>1&nbsp;</span><span>）根据财政部，海关总署，国家税务总局规定，参照中华人民共和国财政部关税【</span><span>2018</span><span>】49</span><span>号《关于完善跨境电子商务零售进口税收政策的通知》要求，跨境电</span><span>子商务零售进口商品的单次交易限值为人民币5</span><span>000</span><span>元，个人年度交易限值为人民币</span><span>26000</span><span>元。在限值以内进口的跨境电子商务零售进口商品，进口环节增值</span><span>税、消费税取消免征税额，暂按法定应纳税额的</span><span>70%</span><span>征收。对于违反上述规定的系统将给予退单；</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>2&nbsp;</span><span>）同商品可能涉及到不同的仓库，因发货仓库不同，货物配送到您手中的时效会稍有区别，请以实际为准；</span></p>
                    <p><span>&nbsp;</span></p>
                    <p><span>3&nbsp;</span><span>）请您确保订单中的收货地址、收件人姓名、收件人身份证号码、手机号码等各项信息的准确性和有效性，以便商品及时、准确地发出，并随时查看个人账户里“我的订单”，关注订单状态更新情况；</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>4&nbsp;</span><span>）如因收货人个人原因导致货物退回，由此产生的费用或其他后果由客户自行承担。</span></p>
                    <p>
                        <span>5 </span><span>）请您确保您在知品屋平台所使用的消费者身份信息在整个购买及收货过程中持续真实、合法、有效；并且您承诺不以任何形式在知品屋平台刷单，不利用知品屋平台进行任何违法活动。</span>
                    </p>
                    <p><span>6</span><span>）所有跨境商品仅限于个人自用，可能由于与国际标准不同而存在风险，不得进行再次销售。</span></p>
                    <p><span>7</span><span>）您知晓并同意知品屋平台有权在您违反本承诺保证时，对您处以暂停服务、关停账户等处罚措施并有权要求您赔偿因违反本承诺保证对知品屋平台造成的全部损失。</span>
                    </p>
                    <p><span>8）跨境婴幼儿奶粉按照国际标准生产，其蛋白质含量可能低于国内标准，长期喂食会造成婴幼儿蛋白质摄入不足，建议及时补充肉类或鱼类辅食。</span></p>
                    <p><span><span>9）</span><span><span>国家药监局提示您</span>：</span><span>请正确认识化妆品功效，化妆品不能替代药品，不能治疗皮肤病等疾病。</span></span>
                    </p>
                </li>
            </ul>
        </div>
        <div class="" v-if="detail &&  detail.trade_type_name == '直邮'">
            <ul class="show-notes-text">
                <li ng-bind-html="Purchasecontent" class="ng-binding">
                    <p><span>a</span><span>）海外直邮商品都是正品吗？</span></p>
                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>平台上所有产品都是供应商海外原装进口，海关监管并检验，并且每个商品进驻海关保税区，都需要做清关，以确保商品是正品。</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>b</span><span>）是否支持退货？</span></p>
                    <p><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>由于跨境购物自身的特殊性（物流距离，耗时较长，商品退换货出关时存在税费及清关的障碍等）所售商品不支持任何无理由退换货，不支持无理由拒收，此类商品如果被拒收或退回，将扣除</span><span>50%</span><span>的订单总金额，请您务必收到货时在快递员见证下先拆包检查，</span>&nbsp;<span>有问题的及时拒收并联系客服处理，没问题再签收！（其他售后问题请参考帮助中心的售后服务）。</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>c</span><span>）为什么有运单号但一直没有物流信息？</span></p>
                    <p>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span>一般情况下，接收到您的单子之后会在</span><span>48</span><span>小时内出运单号，然后将您的个人信息以及运单号一起提交海关审核，等海关审核结束后会进入正常的物流运转。</span>
                    </p>
                    <p><span><br></span></p>
                    <p><span>补充说明：</span></p>
                    <p>
                        <span>1&nbsp;</span><span>）您在知品屋网站上购买的跨境商品为产地直销，商品直接进入试点城市保税仓，接受海关监管，为消费者直接在海外购买购买商品；</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p>
                        <span>2&nbsp;</span><span>）您在知品屋网站购买境外商品时，自动视为同意由知品屋代您向中国海关进行申报和代缴税款。因此在下单前需提供您的姓名和身份证号码进行实名身份信息</span>&nbsp;<span>注册认证；</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span>3&nbsp;</span><span>）商品本身可能无中文标签，您可以查看网站的翻译或者在线联系我们的客服；</span></p>
                    <p><span>&nbsp;</span></p>
                    <p><span>4&nbsp;</span><span>）您购买的境外商品适用的品质，健康，标识等项目使用标准符合原产国使用标准，但是可能与我国标准有所不同，所以在使用过程中由此可能产生的危害</span>&nbsp;<span>或损失以及其他风险，由您个人承担。</span>
                    </p>
                    <p><span>&nbsp;</span></p>
                    <p><span></span></p>
                    <p>
                        <span>5 </span><span>）请您确保您在知品屋平台所使用的消费者身份信息在整个购买及收货过程中持续真实、合法、有效；并且您承诺不以任何形式在知品屋平台刷单，不利用知品屋平台进行任何违法活动。</span>
                    </p>
                    <p><span>6</span><span>）所有跨境商品仅限于个人自用，可能由于与国际标准不同而存在风险，不得进行再次销售。</span></p>
                    <p><span>7</span><span>）您知晓并同意知品屋平台有权在您违反本承诺保证时，对您处以暂停服务、关停账户等处罚措施并有权要求您赔偿因违反本承诺保证对知品屋平台造成的全部损失。</span>
                    </p>
                    <p><span>8）跨境婴幼儿奶粉按照国际标准生产，其蛋白质含量可能低于国内标准，长期喂食会造成婴幼儿蛋白质摄入不足，建议及时补充肉类或鱼类辅食。</span></p>
                    <p>
                        <span>9<span>）</span></span><span><span>国家药监局提示您</span>：</span><span>请正确认识化妆品功效，化妆品不能替代药品，不能治疗皮肤病等疾病。</span>
                    </p>
                </li>
            </ul>
        </div>
    </div>
</div>
</div>
</div> -->
</template>

<script>
    var galleryThumbs = null;
    var galleryTop = null;
    var galleryRight = null;
    // 记录规格的数组
    let goodsSpecArr = [];
    // 记录运费
    let freightArr = [];
    let mapItemId = {};
    let mapChecked = {};
    import homefooter from '../assembly/footer'
    import {
        swiper,
        swiperSlide
    } from 'vue-awesome-swiper'
    import 'swiper/swiper-bundle.css'
    import PicZoom from 'vue-piczoom'
    import {
        regionData,
        CodeToText,
    } from 'element-china-area-data';
    export default {
        components: {
            swiper,
            swiperSlide,
            PicZoom,
            homefooter
        },
        data() {
            return {
                detailtype: '',
                selectSku: '', //默认的规格，选中的规格
                spec_many: {},
                detialdata: {},
                params: {
                    goods_id: '',
                    type: 'pc'
                },
                activeIn: '',
                swiperOption: {
                    loop: false, // 是否循环轮播
                    autoplay: false, // 是否可以自动轮播
                    slidesPerView: 4, // 可是区域内可展示多少个块
                    spaceBetween: 0, // 块之间间隔距离
                    initialSlide: 0, // 默认初始显示块
                    freeMode: false,
                    // 显示分页
                    // pagination: {
                    //     el: '.swiper-pagination',
                    //     clickable: true
                    //   },
                    // 设置点击箭头
                    navigation: {
                        nextEl: '.swiper-button-next',
                        prevEl: '.swiper-button-prev',
                    },
                },
                mainImgUrl: 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
                imgUrlList: [],
                Bigurl: require("../../assets/img/index/good.jpg"),
                isShow: 0,
                form: {},
                regionData: {

                },
                value: '',
                num: '',
                activeName: 'first',
                act: 'one',




                //之前的数据
                taxation: 0.091, //税率
                taxationFee: 0, //税费
                min_price: 0,
                max_price: 0,
                numCI: ["重量", "数量", "罐", "盒", "件", "套", "瓶", "组", "支", "袋", '个', "台", "面", "辆", "匹", "只", "块", "点", "条", "滴", "片", "寸", "米", "尺", "千克", "克拉", "吨", "瓶", "盒", "杯", "箱", "桶", "罐", "群", "双", "束", "对", "包", "根"],
                dateCI: ["生产日期", "日期", "有效期", "无效期"],
                unit: "",
                loading: true,
                act: "one",
                currentIndex: 0,
                rightIndex: 0,
                // options: regionData,
                dialogForm: {
                    name: "",
                    selectProv: "",
                    selectCity: "",
                    selectCountry: "",
                    mark: "",
                },
                selectItems: [],
                rules: {
                    name: [{
                        required: true,
                        message: "请输入街道名称",
                        trigger: "blur"
                    }],
                    selectProv: [{
                        required: true,
                        message: "请选择省份",
                        trigger: "change"
                    }, ],
                    selectCity: [{
                        required: true,
                        message: "请选择城市",
                        trigger: "change"
                    }, ],
                    selectCountry: [{
                        required: true,
                        message: "请选择市区",
                        trigger: "change"
                    }, ],
                },
                dialogFormFenLeiVisible: false,
                multipleSelection: [],
                isActive: true,
                id: "",
                num: 1,
                inventory: 0,
                formData: {},
                addRess: [],
                search: '',
                addShow1: false,
                cityOne: '',
                cityTwo: '',
                cityThree: '',
                twoArr: [],
                threeArr: [],
                cityIndex: null,
                ctiyChildrenIndex: null,
                opt: null,
                goodsID: '',
                freight: 0,
                btnShow: true,
                priceGoods: null,
                goodsMultiSpec: {}, // 多规格信息
                generalProductLifeList: [],
                activityProductLifeList: [],
                freightForm: null, // 运费
                goodsListPrice: 0, //单价
                goods_total_price: 0, //总价,
                skuNum: 1,
                skuPrice: 0,
                nmShow: false,




                activeAct: 1, // 1活动商品
                detail: null, //商品详情
                selectSku: "", //当前选择规格
                sku: null, //html规格循环
                skuCoverImage: "", //规格图片
                skuPrices: {}, //规格价格和数量
                dataArr: null, //商品数据
                curAct: [], //当前选择规格数组形式
                isRu: false, //判断规格是否包含数量名词
                isTu: false, //判断规格是否包含日期名词
                yesSku: [], //运费关联可选规格(日期),
                yesSku1: [], //运费关联可选规格(数量),
                noSK: [], //所有可选规格
                onePrice: 0, //单价
                stock_num: 0, //数量
                goods_sum_price: 0, //商品总价
                ar: []
            }
        },
        created() {
            console.log(regionData);
            this.regionData = regionData
            this.params.goods_id = this.$route.query.id
            this.id = this.$route.query.id;
            this.getDetail();
        },
        watch: {
            $route: function(newVal) {
                this.id = newVal.query.id;
                this.isRu = false;
                this.isTu = false;
                this.num = 1;
                this.getDetail();
            },
            cityIndex() {
                this.twoArr = this.opt[this.cityIndex].children;
                this.threeArr = this.opt[this.cityIndex].children[this.ctiyChildrenIndex].children;
            },
            ctiyChildrenIndex() {
                this.threeArr = this.opt[this.cityIndex].children[this.ctiyChildrenIndex].children;
            },
        },
        methods: {


            changPro(data) {
                this.activeAct = data;
                this.isRu = false;
                this.isTu = false;
                this.initData();
            },
            numIn(e) {

                if (parseInt(this.stock_num) < parseInt(this.num)) {
                    this.$notifyError(`最多限购${this.stock_num}件`);
                    this.num = this.stock_num;
                }
                if (this.num == "") {
                    this.num = 0;
                }

                this.goods_total_price = parseFloat(this.goods_sum_price) * parseFloat(this.num);
                console.log(this.num)
            },
            getFreight() {
                console.log(123);
                var arr = [];
                arr.push(this.opt[this.cityOne].region_name);
                arr.push(this.opt[this.cityOne].children[this.cityTwo].region_name);
                arr.push(this.opt[this.cityOne].children[this.cityTwo].children[this.cityThree].region_name);
                this.btnShow = true;
                this.nmShow = false;



                this.$HttpGet("/index.php?s=/admin/goods/getGoodPrice", {
                    goods_id: this.goodsID,
                    address: arr.join("|"),
                    total: this.num
                }).then(res => {
                    if (res.data.length == 0 || res.data == null) {
                        this.generalProductLifeList = [];
                        this.activityProductLifeList = [];
                    } else {
                        this.generalProductLifeList = res.data.generalProductLifeList;
                        this.activityProductLifeList = res.data.activityProductLifeList;
                    }

                    if (res.data.generalProductLifeList == null) {
                        this.generalProductLifeList = [];
                    }
                    if (res.data.activityProductLifeList == null) {
                        this.activityProductLifeList = [];
                    }
                    if (this.activeAct == 1 && (res.data.activityProductLifeList == null || res.data.activityProductLifeList.length == 0)) {
                        this.activeAct = 0;
                    }
                    if (this.detail.source != "HD") {
                        if (this.detail.spec_type == 20) {
                            this.initData();
                        } else {

                            this.onePrice = this.detail.goods_price ? this.detail.goods_price : this.detail.single_price;
                            this.selectSku = this.detail.goods_sku.spec_sku_id
                            return false
                        }
                        return false;
                    }
                    if (this.detail.spec_type == 20) {
                        this.initData();
                        console.log(this.sku)
                    } else {
                        this.onePrice = this.detail.goods_price ? this.detail.goods_price : this.detail.single_price;
                        return false
                    }
                })
            },
            oneCity(index) {
                this.cityIndex = index;
                this.ctiyChildrenIndex = 0;
                this.cityTwo = 0;
                this.cityThree = 0;
                this.isRu = false;
                this.isTu = false;
                this.nmShow = false;
                this.selectSku = "";
                // this.num=1;
                this.activeAct = this.detail.is_activity;
                this.getFreight();
            },
            twoCity(index) {
                this.isRu = false;
                this.isTu = false;
                this.ctiyChildrenIndex = index;
                this.cityThree = 0;
                this.activeAct = this.detail.is_activity;
                this.getFreight();
            },
            threeCity(index) {
                this.isRu = false;
                this.isTu = false;
                this.activeAct = this.detail.is_activity;
                this.getFreight();
            },
            getAddressList() {
                this.$HttpGet("/index.php?s=/admin/home.address/getcachetree").then(res => {
                    this.opt = res.data;
                    var bz = false;
                    var region = null;
                    for (let i = 0; i < this.addRess.length; i++) {
                        if (this.addRess[i].is_status == 1) {
                            bz = true;
                            region = this.addRess[i].region;
                            break;
                        }
                    }
                    console.log(this.addRess)


                    //默认地址
                    for (let i = 0; i < this.opt.length; i++) {

                        if (this.opt[i].region_name == "重庆市") {
                            this.cityOne = i;
                            this.cityIndex = i;
                        }
                    }

                    for (let i = 0; i < this.opt[this.cityOne].children.length; i++) {
                        if (this.opt[this.cityOne].children[i].region_name == "重庆市") {
                            this.cityTwo = i;
                            this.ctiyChildrenIndex = i;

                        }
                    }
                    for (let i = 0; i < this.opt[this.cityOne].children[this.cityTwo].children.length; i++) {
                        if (this.opt[this.cityOne].children[this.cityTwo].children[i].region_name == "渝中区") {
                            this.cityThree = i;
                        }
                    }
                    console.log(this.cityOne, this.cityIndex, this.cityTwo, this.ctiyChildrenIndex, this.cityThree, )
                    this.getFreight();
                })

            },


            /* 购物车动画开始*/
            addShopCart() {
                this.addShow = true
                setTimeout(() => {
                    this.addShow = false
                }, 1000)
            },
            addShopCart1() {
                this.addShow1 = true
            },

            // 动画钩子函数
            // 进入前状态
            beforeEnter(el) {

                el.style.left = '200px';
                el.style.top = '-25px';
                el.style.transform = 'scale(1)'
            },
            // 进入中
            enter(el, done) {

                // 需要调用元素的offset操作,才有过渡的效果,否则会马上实现过渡
                var wid = document.getElementById('jhd').getBoundingClientRect();
                var widp = document.getElementsByClassName('floatingWindow')[0].getBoundingClientRect();
                var width = document.body.clientWidth - wid.left + 70;
                // console.log('购物车', wid.top)
                // console.log('滚动条', document.documentElement.scrollTop)
                // console.log('右边', widp.top);
                el.offsetWidth;
                el.style.left = `${width}px`;
                el.style.top = `${widp.top - wid.top}px`;
                el.style.zIndex = '999';
                el.style.transform = 'scale(.5)';
                done()
            },
            // 进入后
            afterEnter() {
                this.addShow1 = false
            },

            // 新增
            addItem() {
                this.list.push(this.list.length + 1)
            },
            // 删除
            removeItem() {
                if (this.list.length > 1) {
                    this.list.pop()
                }
            },
            /* 购物车动画结束*/
            childClick() {
                this.$emit('chang', 'nav')
            },
            getAddres() {
                this.$HttpGet("/index.php?s=/admin/home.address/lists", {
                    search: this.search
                }).then(res => {
                    this.addRess = res.data.list.data;
                    this.getAddressList();
                })
            },

            cartesianProductOf(a) {
                return Array.prototype.reduce.call(arguments, function(a, b) {
                    var ret = [];
                    a.forEach(function(a) {
                        b.forEach(function(b) {
                            ret.push(a.concat([b]));
                        });
                    });
                    return retdetailtrade_type_name;
                }, [
                    []
                ]);
            },
            onSwitchSpec(e, i, j) {
                let attrIdx = parseInt(e.currentTarget.dataset.attridx) ? parseInt(e.currentTarget.dataset.attridx) : i,
                    itemIdx = parseInt(e.currentTarget.dataset.itemidx) ? parseInt(e.currentTarget.dataset.itemidx) : j;
                let selectArr = this.selectSku.split("_");
                selectArr[attrIdx] = itemIdx + "";
                this.selectSku = selectArr.join("_");
                // this.num=1;
                this.enableData();
                if (this.noSK.indexOf(this.selectSku) == -1) {
                    let se = "";
                    for (let z = attrIdx + 1; z < this.sku.length; z++) {
                        for (let q = 0; q < this.sku[z].spec_items.length; q++) {
                            if (this.sku[z].spec_items[q].disabled) {
                                this.sku[z].spec_items[q].checked = false;
                            } else {
                                this.sku[z].spec_items[q].checked = true;
                                se = (this.sku[z].spec_items[q].item_id)
                                break;
                            }
                        }
                        // debugger
                        selectArr[z] = se + "";
                        this.selectSku = selectArr.join("_");
                        this.enableData();
                    }
                } else {
                    // debugger
                    for (let z = 0; z < this.sku.length; z++) {
                        for (let q = 0; q < this.sku[z].spec_items.length; q++) {
                            if (selectArr.indexOf(this.sku[z].spec_items[q].item_id + "") == -1) {
                                this.sku[z].spec_items[q].checked = false;
                            } else {
                                this.sku[z].spec_items[q].checked = true;
                            }
                        }
                    }
                }
                this._updateSpecGoods();

            },
            /**
             * 更新商品规格信息
             */
            _updateSpecGoods() {
                let sku = this.selectSku;
                this.skuPrice = this.skuPrices[sku][0];
                this.skuNum = this.skuPrices[sku][1];
                this.goods_sum_price = this.skuPrices[sku][0];
                this.goods_total_price = this.skuPrices[sku][0];
                let data = null;
                if (this.activeAct == 1) {
                    //活动运费
                    data = this.activityProductLifeList
                } else {
                    //常规运费
                    data = this.generalProductLifeList
                }
                let freightForm = null;
                // 设置运费
                for (let j in data) {
                    if (this.curAct.indexOf(data[j].life) != -1 && this.curAct.indexOf(data[j].productNum.toString()) != -1 && this.detail.source == "HD") {
                        freightForm = data[j];
                        break;
                    }
                    // debugger
                    if (this.detail.source != "HD") {
                        var a = new Set(data[j].spec_attr.split("_"));
                        var b = new Set(this.curAct);
                        // 差集
                        let difference = Array.from(new Set([...b].filter(x => !a.has(x))))
                        let difference1 = Array.from(new Set([...a].filter(x => !b.has(x))))
                        if (difference.length == 0 && difference1 == 0) {
                            freightForm = data[j];
                            break;
                        }

                    }
                }
                // debugger
                let stock_num = this.skuPrices[this.selectSku][2].form.stock_num;
                let goods_price = this.skuPrices[this.selectSku][0]
                    // debugger

                this.skuPrice = parseFloat(this.skuPrice);
                this.skuNum = parseFloat(this.skuNum);
                this.goods_sum_price = parseFloat(this.goods_sum_price);
                this.goods_total_price = parseFloat(this.goods_total_price) * parseFloat(this.num);
                this.freightForm = freightForm;
                this.stock_num = stock_num;
                this.goods_price = goods_price;
                this.onePrice = (this.skuPrice / this.skuNum).toFixed(2) != "NaN" ? (this.skuPrice / this.skuNum).toFixed(2) : 0;
                this.taxationFee = ((this.goods_sum_price + (freightForm && freightForm.freightMoney || 0)) / (1 + this.taxation) * this.taxation).toFixed(2)

                this.nmShow = true
            },
            taxationCount(money) {
                console.log("money", money)
                    //税费=商品价格/（1+税率）*税率
                let moneyTaxation = money / (1 + this.taxation) * this.taxation;
                return moneyTaxation;
            },
            /**
             * 初始化商品多规格
             */
            initData() {
                if (this.detail.spec_type == 20) {

                    let numId = {}; //数量item_id
                    let numArr = [];
                    let priceArr = []; //规格单价
                    let minPric = 0; //最小单价
                    let itemIds = [];
                    let priceMinSku = ""; //最小单价规格
                    let showSkuIds = []; //可显示规格id数组
                    let min = 99999999;
                    let ProductLifeList = []; //运费列表
                    let CI = this.numCI.concat(this.dateCI);
                    // 规格数据排序
                    this.dataSort(this.goodsMultiSpec);

                    //数量单位规格 重复代码后面再优化
                    for (let i = 0; i < this.goodsMultiSpec.spec_attr.length; i++) {
                        if (this.detail.source != "HD" && !this.isRu && this.goodsMultiSpec.spec_attr.length == 1 && this.numCI.indexOf(this.goodsMultiSpec.spec_attr[i].group_name) != -1 && this.$isNumber(this.goodsMultiSpec.spec_attr[0].spec_items[0].spec_value)) {
                            this.isRu = true;
                            for (let j = 0; j < this.goodsMultiSpec.spec_attr[i].spec_items.length; j++) {
                                let name = this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id;
                                numId[name] = this.goodsMultiSpec.spec_attr[i].spec_items[j].spec_value;
                                numArr.push(this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id)
                            }
                        }
                        if (i == 1 && !this.isRu && this.detail.source != "HD" && this.$isNumber(this.goodsMultiSpec.spec_attr[i].spec_items[0].spec_value)) {
                            this.isRu = true;
                            for (let j = 0; j < this.goodsMultiSpec.spec_attr[i].spec_items.length; j++) {
                                let name = this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id;
                                numId[name] = this.goodsMultiSpec.spec_attr[i].spec_items[j].spec_value;
                                numArr.push(this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id)
                            }
                        }
                        if (this.numCI.indexOf(this.goodsMultiSpec.spec_attr[i].group_name) != -1 && !this.isRu && this.detail.source == "HD") {
                            this.isRu = true;
                            for (let j = 0; j < this.goodsMultiSpec.spec_attr[i].spec_items.length; j++) {
                                let name = this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id;
                                numId[name] = this.goodsMultiSpec.spec_attr[i].spec_items[j].spec_value;
                                numArr.push(this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id)
                            }
                            // break;
                        }
                        if (this.dateCI.indexOf(this.goodsMultiSpec.spec_attr[i].group_name) != -1 && !this.isTu) {
                            this.isTu = true;
                            // break;
                        }
                    }


                    //关联运费 规格顺序问题 还待测试
                    if (this.activeAct == 1) {
                        ProductLifeList = this.activityProductLifeList
                    } else {
                        ProductLifeList = this.generalProductLifeList
                    }
                    let attr = this.goodsMultiSpec.spec_attr;
                    let yesSku = [];
                    let yesSku1 = [];
                    let ar = [];
                    for (let h = 0; h < ProductLifeList.length; h++) {
                        let lifeArr = [];
                        if (this.detail.source != "HD") {
                            // debugger
                            lifeArr = ProductLifeList[h].spec_attr.split("_");
                            let pr = []
                            for (let vs = 0; vs < attr.length; vs++) {
                                for (let vc = 0; vc < attr[vs].spec_items.length; vc++) {
                                    if (lifeArr.indexOf(attr[vs].spec_items[vc].spec_value) != -1) {
                                        pr.push(attr[vs].spec_items[vc].item_id + "")
                                    }
                                }
                            }
                            ar.push(pr)
                        } else {
                            lifeArr = [
                                ProductLifeList[h].life + "", //日期
                                ProductLifeList[h].productNum + "", //数量
                            ];
                        }
                        let conca = "_"
                        for (let vs = 0; vs < attr.length; vs++) {
                            for (let vc = 0; vc < attr[vs].spec_items.length; vc++) {
                                if (lifeArr.indexOf(attr[vs].spec_items[vc].spec_value + "") != -1 && this.dateCI.indexOf(attr[vs].group_name) != -1) {
                                    yesSku.push(attr[vs].spec_items[vc].item_id)
                                }
                                if (lifeArr.indexOf(attr[vs].spec_items[vc].spec_value + "") != -1 && this.numCI.indexOf(attr[vs].group_name) != -1) {
                                    yesSku1.push(attr[vs].spec_items[vc].item_id)
                                }
                            }
                        }
                    }
                    this.ar = ar;
                    yesSku = Array.from(new Set(yesSku));
                    yesSku1 = Array.from(new Set(yesSku1));
                    this.yesSku = yesSku;
                    this.yesSku1 = yesSku1;



                    //没有数量单位才做
                    if (!this.isRu) {
                        let seKu = ""
                        for (let f = 0; f < this.goodsMultiSpec.spec_list.length; f++) {
                            let price = this.goodsMultiSpec.spec_list[f].form.goods_price;
                            // if(this.detail.source != "HD"){
                            let bz = false
                            let a = new Set(this.goodsMultiSpec.spec_list[f].spec_sku_id.split('_'));
                            let b = null;
                            for (let i = 0; i < ar.length; i++) {
                                b = new Set(ar[i])
                                let difference = Array.from(new Set([...a].filter(x => !b.has(x))))
                                if (difference.length == 0) {
                                    bz = true
                                    break;
                                }
                            }
                            // }
                            if (parseFloat(price) < min && this.goodsMultiSpec.spec_list[f].form.stock_num > 0 && bz) {
                                min = parseFloat(price)
                                seKu = this.goodsMultiSpec.spec_list[f].spec_sku_id;
                            }
                            this.skuPrices[this.goodsMultiSpec.spec_list[f].spec_sku_id] = [this.goodsMultiSpec.spec_list[f].form.goods_price, 1, this.goodsMultiSpec.spec_list[f]]
                        }
                        if (ProductLifeList.length == 0) {
                            seKu = ""
                        }
                        // debugger
                        if (seKu == "") {
                            this.sku = this.goodsMultiSpec.spec_attr;
                            for (let g = 0; g < this.sku.length; g++) {
                                for (let s = 0; s < this.sku[g].spec_items.length; s++) {
                                    this.sku[g].spec_items[s].disabled = true;
                                    this.sku[g].spec_items[s].checked = false;
                                }
                            }
                            this.selectSku = "";
                            this.onePrice = 0;
                            this.goods_sum_price = 0;
                            this.goods_total_price = 0;
                            this.freightForm = 0;
                            this.nmShow = true;
                            return false
                        }
                        this.selectSku = seKu;
                        this.sku = this.goodsMultiSpec.spec_attr;

                        this.enableData();
                        this._updateSpecGoods();
                        return false

                    }
                    //规格价格
                    for (let i = 0; i < this.goodsMultiSpec.spec_list.length; i++) {
                        let arr = this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_");
                        showSkuIds.push(...arr);
                        //关联运费   规格顺序问题 还待测试
                        let isTr = false;
                        let isTr1 = false;
                        if (this.activeAct == 1) {
                            for (let to = 0; to < yesSku.length; to++) {
                                let id = this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if (id.indexOf(yesSku[to] + "") != -1) {
                                    isTr = true;
                                    break;
                                }
                            }
                            for (let to = 0; to < yesSku1.length; to++) {
                                let id = this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if (id.indexOf(yesSku1[to] + "") != -1) {
                                    isTr1 = true;
                                    break;
                                }
                            }
                        } else {
                            for (let to = 0; to < yesSku.length; to++) {
                                let id = this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if (id.indexOf(yesSku[to] + "") != -1) {
                                    isTr = true;
                                    break;
                                }
                            }
                            for (let to = 0; to < yesSku1.length; to++) {
                                let id = this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if (id.indexOf(yesSku1[to] + "") != -1) {
                                    isTr1 = true;
                                    break;
                                }
                            }
                        }
                        if (this.detail.source != "HD") {
                            isTr = false;
                            isTr1 = false;
                            let a = new Set(this.goodsMultiSpec.spec_list[i].spec_sku_id.split('_'));
                            let b = null;
                            for (let i = 0; i < ar.length; i++) {
                                b = new Set(ar[i])
                                let difference = Array.from(new Set([...a].filter(x => !b.has(x))))
                                if (difference.length == 0) {
                                    isTr = true;
                                    isTr1 = true;
                                    break;
                                }
                            }
                        }
                        if (!this.isTu) {
                            isTr = true;
                        }
                        if (!this.isRu) {
                            isTr1 = true;
                        }
                        //自营商品
                        for (let j = 0; j < arr.length; j++) {
                            //不是活动商品
                            if (numArr.indexOf(parseInt(arr[j])) != -1 && this.goodsMultiSpec.spec_list[i].form.stock_num > 0 && this.activeAct != 1) {
                                let money = parseFloat(this.goodsMultiSpec.spec_list[i].form.goods_price) / parseFloat(numId[arr[j]]);
                                // 如果不和运费接口关联 去掉 isTr 条件
                                if (this.goodsMultiSpec.spec_list[i].form.is_activity != 1 && isTr && isTr1) {
                                    priceArr.push(money)
                                    itemIds.push(this.goodsMultiSpec.spec_list[i].spec_sku_id);
                                    this.skuPrices[this.goodsMultiSpec.spec_list[i].spec_sku_id] = [this.goodsMultiSpec.spec_list[i].form.goods_price, numId[arr[j]], this.goodsMultiSpec.spec_list[i]]
                                }

                            }
                            //活动商品
                            if (this.activeAct == 1 && numArr.indexOf(parseInt(arr[j])) != -1 && this.goodsMultiSpec.spec_list[i].form.stock_num > 0) {
                                let money = parseFloat(this.goodsMultiSpec.spec_list[i].form.goods_price) / parseFloat(numId[arr[j]]);
                                if (this.goodsMultiSpec.spec_list[i].form.is_activity == 1 && isTr && isTr1) {
                                    priceArr.push(money)
                                    itemIds.push(this.goodsMultiSpec.spec_list[i].spec_sku_id);
                                    this.skuPrices[this.goodsMultiSpec.spec_list[i].spec_sku_id] = [this.goodsMultiSpec.spec_list[i].form.goods_price, numId[arr[j]], this.goodsMultiSpec.spec_list[i]]
                                }

                            }
                        }
                    }
                    // debugger
                    //如果没有规格可选择
                    if (priceArr.length == 0) {
                        this.sku = this.goodsMultiSpec.spec_attr;
                        for (let g = 0; g < this.sku.length; g++) {
                            for (let s = 0; s < this.sku[g].spec_items.length; s++) {
                                this.sku[g].spec_items[s].disabled = true;
                                this.sku[g].spec_items[s].checked = false;
                            }
                        }
                        this.selectSku = "";
                        this.onePrice = 0;
                        this.goods_sum_price = 0;
                        this.goods_total_price = 0;
                        this.freightForm = 0;
                        this.nmShow = true;


                        return false
                    }

                    minPric = Math.min(...priceArr);
                    this.onePrice = parseFloat(minPric).toFixed(2)

                    let index = priceArr.indexOf(minPric) != -1 ? priceArr.indexOf(minPric) : 0;

                    priceMinSku = itemIds[index];
                    this.selectSku = priceMinSku;
                    let Ids = Array.from(new Set(showSkuIds));
                    let showSk = JSON.parse(JSON.stringify(this.goodsMultiSpec.spec_attr));

                    // debugger
                    for (let m = 0; m < this.goodsMultiSpec.spec_attr.length; m++) {
                        showSk[m].spec_items = [];
                        for (let n = 0; n < this.goodsMultiSpec.spec_attr[m].spec_items.length; n++) {
                            let id = this.goodsMultiSpec.spec_attr[m].spec_items[n].item_id;
                            showSk[m].spec_items.push(this.goodsMultiSpec.spec_attr[m].spec_items[n]);
                            showSk[m].spec_items[n].disabled = false;
                            showSk[m].spec_items[n].checked = false;
                            if (Ids.indexOf(id + "") != -1) {
                                let arr = priceMinSku.split("_")
                                showSk[m].spec_items[n].disabled = false;
                                if (arr.indexOf(showSk[m].spec_items[n].item_id + "") != -1) {
                                    showSk[m].spec_items[n].checked = true;
                                } else {
                                    showSk[m].spec_items[n].checked = false;
                                }

                            }
                        }
                    }
                    //排序
                    showSk.forEach((item, i) => {
                        item.spec_items.sort((a, b) => a['spec_value'] - b['spec_value']);
                    });
                    this.sku = showSk;
                    this.enableData();
                    this._updateSpecGoods();


                }
            },
            enableData() {
                let selectArr = this.selectSku.split("_");
                let dipalyAct = [];
                for (let x = 0; x < selectArr.length; x++) {
                    for (let y = 0; y < this.goodsMultiSpec.spec_list.length; y++) {
                        let arrs = this.goodsMultiSpec.spec_list[y].spec_sku_id.split("_");
                        if (arrs.indexOf(selectArr[x]) != -1 && this.goodsMultiSpec.spec_list[y].form.stock_num > 0) {
                            dipalyAct.push(...arrs)
                        }

                    }
                }
                let Idss = Array.from(new Set(dipalyAct));
                let skuNum = {};
                let noSkuNum = {}; //可选择
                for (let u = 0; u < this.sku.length; u++) {
                    let sku = [];

                    for (let ns = 0; ns < this.sku[u].spec_items.length; ns++) {
                        let bz = 0;
                        let nbz = 0;
                        this.sku[u].spec_items[ns].disabled = false;
                        this.sku[u].spec_items[ns].checked = false;
                        if (selectArr.indexOf(this.sku[u].spec_items[ns].item_id + "") != -1) {
                            this.sku[u].spec_items[ns].checked = true;
                        }
                        noSkuNum[this.sku[u].spec_items[ns].item_id] = [];
                        for (let k = 0; k < this.goodsMultiSpec.spec_list.length; k++) {
                            let ar = this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_");
                            //关联运费   规格顺序问题 还待测试
                            let isTr = false;
                            let isTr1 = false;
                            if (this.activeAct == 1) {
                                for (let to = 0; to < this.yesSku.length; to++) {
                                    let id = this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if (id.indexOf(this.yesSku[to] + "") != -1) {
                                        isTr = true;
                                        break;
                                    }
                                }
                                for (let to = 0; to < this.yesSku1.length; to++) {
                                    let id = this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if (id.indexOf(this.yesSku1[to] + "") != -1) {
                                        isTr1 = true;
                                        break;
                                    }
                                }
                            } else {
                                for (let to = 0; to < this.yesSku.length; to++) {
                                    let id = this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if (id.indexOf(this.yesSku[to] + "") != -1) {
                                        isTr = true;
                                        break;
                                    }
                                }
                                for (let to = 0; to < this.yesSku1.length; to++) {
                                    let id = this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if (id.indexOf(this.yesSku1[to] + "") != -1) {
                                        isTr1 = true;
                                        break;
                                    }
                                }
                            }
                            if (this.detail.source != "HD") {
                                isTr = false;
                                isTr1 = false;
                                let a = new Set(this.goodsMultiSpec.spec_list[k].spec_sku_id.split('_'));
                                let b = null;
                                for (let i = 0; i < this.ar.length; i++) {
                                    b = new Set(this.ar[i])
                                    let difference = Array.from(new Set([...a].filter(x => !b.has(x))))
                                    if (difference.length == 0) {
                                        isTr = true;
                                        isTr1 = true;
                                        break;
                                    }
                                }
                            }
                            if (!this.isRu) {
                                isTr1 = true;
                            }
                            if (!this.isTu) {
                                isTr = true;
                            }
                            //自营商品
                            // if(this.detail.source != "HD"){
                            //     isTr=true;
                            //     isTr1=true;
                            // }
                            //不是活动
                            if (ar.indexOf(this.sku[u].spec_items[ns].item_id + "") != -1 && this.goodsMultiSpec.spec_list[k].form.stock_num > 0 && this.activeAct != 1) {
                                // 如果不和运费接口关联 去掉 isTr 条件
                                if (this.goodsMultiSpec.spec_list[k].form.is_activity != 1 && isTr && isTr1) {
                                    noSkuNum[this.sku[u].spec_items[ns].item_id].push(this.goodsMultiSpec.spec_list[k].spec_sku_id)
                                }
                            }
                            //是活动
                            if (ar.indexOf(this.sku[u].spec_items[ns].item_id + "") != -1 && this.goodsMultiSpec.spec_list[k].form.stock_num > 0 && this.activeAct == 1) {
                                if (this.goodsMultiSpec.spec_list[k].form.is_activity == 1 && isTr && isTr1) {
                                    noSkuNum[this.sku[u].spec_items[ns].item_id].push(this.goodsMultiSpec.spec_list[k].spec_sku_id)
                                }
                            }
                        }
                        if (Idss.indexOf(this.sku[u].spec_items[ns].item_id + "") == -1) {
                            sku.push(ns)
                        }
                    };
                }
                // debugger
                let no = [];
                let sele = this.selectSku.split("_");
                let addSele = "_";
                let up = [];
                let down = [];
                for (let kk = 0; kk < sele.length; kk++) {
                    //向上
                    if (kk == 1) {
                        for (let r1 = 0; r1 < noSkuNum[sele[kk]].length; r1++) {
                            let ars = noSkuNum[sele[kk]][r1].split("_");
                            for (let o = 0; o < ars.length; o++) {
                                if (ars[o] == sele[kk]) {
                                    up.push(ars[o - 1])
                                    break
                                }
                            }

                        }
                    }
                    //向下
                    if (kk < sele.length) {
                        let ljq = "_";
                        for (let c = 0; c <= kk; c++) {
                            ljq = ljq + sele[c] + "_"
                        }
                        ljq = ljq.slice(1, ljq.length);
                        // debugger
                        for (let r2 = 0; r2 < noSkuNum[sele[kk]].length; r2++) {
                            let arss = noSkuNum[sele[kk]][r2].split("_");
                            let bn = "_";
                            for (let o = 0; o < arss.length; o++) {
                                bn = bn + arss[o] + "_"
                                let bs = bn.slice(1, bn.length);
                                if (bs == ljq) {
                                    down.push(arss[o + 1])
                                    break
                                }
                            }
                        }
                    }


                }
                up = Array.from(new Set(up));
                down = Array.from(new Set(down));
                no = up.concat(down);
                console.log("meiyou ", up, down)
                    // debugger
                this.curAct = [];
                for (let w = 0; w < this.sku.length; w++) {
                    for (let m = 0; m < this.sku[w].spec_items.length; m++) {
                        if (no.indexOf(this.sku[w].spec_items[m].item_id + "") != -1) {
                            this.sku[w].spec_items[m].disabled = false
                        } else {
                            this.sku[w].spec_items[m].disabled = true
                        }
                        if (this.sku[w].spec_items[m].checked) {
                            this.curAct.push(this.sku[w].spec_items[m].spec_value)
                        }
                    }
                }

                for (let cnm = 0; cnm < this.sku[0].spec_items.length; cnm++) {
                    if (noSkuNum[this.sku[0].spec_items[cnm].item_id].length != 0) {
                        this.sku[0].spec_items[cnm].disabled = false
                    }
                }
                let noSK = [];
                for (let item in noSkuNum) {
                    noSK = noSK.concat(noSkuNum[item])
                }
                noSK = Array.from(new Set(noSK))
                this.noSK = noSK
                    // this.setData({
                    //     sku:this.data.sku,
                    //     curAct:this.data.curAct,
                    //     noSK:noSK
                    // })
            },


            // 数据排序
            dataSort(data) {
                let sku_id = data.spec_list[0].spec_sku_id.split("_");
                let arr = [];
                // debugger
                for (let i in sku_id) {
                    arr.push(this.setAttrSort(data, sku_id[i]));
                }
                data.spec_attr = arr;
            },
            // 对attr数据进行排序
            setAttrSort(data, id) {
                for (let i in data.spec_attr) {
                    let child = data.spec_attr[i].spec_items;
                    for (let j in child) {
                        if (child[j].item_id == id) {
                            return data.spec_attr[i];
                        }
                    }
                }
                return {};
            },
            getDetail() {
                const that = this;
                this.$HttpGet(`/index.php?s=/admin/goods/detail&goods_id=${this.id}&type=pc`).then(res => {
                    if (res.code != 0) {
                        return false
                    }
                    if (res.data.length == 0) {
                        this.$notifyError(res.msg);
                        this.$router.push("/index/commodity/home?type_name=0");
                        return false;
                    }

                    this.detialdata = res.data
                    this.mainImgUrl = res.data.big_img
                    this.imgUrlList = JSON.parse(this.detialdata.images)
                    this.spec_many = this.detialdata.spec_many
                    this.selectSku = this.detialdata.goods_sku.spec_sku_id
                    console.log(this.imgUrlList, '4545');
                    this.loading = false



                    this.min_price = parseFloat(res.data.min_price);
                    this.max_price = parseFloat(res.data.max_price);
                    // debugger
                    this.goodsID = res.data.goods_id;
                    this.unit = res.data.unit;

                    this.detail = res.data;
                    this.detailtype = res.data.trade_type_name
                    this.goodsMultiSpec = res.data.spec_many;
                    this.dataArr = res.data;
                    this.sku = res.data.spec_many.spec_attr;
                    if (res.data.is_activity == 1) {
                        this.activeAct = 1;
                    } else {
                        this.activeAct = 3;
                    }
                    this.getAddres();
                    this.loading = false
                }).catch((e) => {
                    console.log(e)
                })
            },

            modinfyNum(type) {
                this.num = parseInt(this.num)
                console.log(this.num);
                console.log(this.stock_num);
                if (type == "add") {

                    if (this.stock_num > 0) {
                        if (this.num >= this.stock_num) {
                            this.$notifyError("你已超过最大购买数量");
                        } else {
                            // this.num += 1;
                            this.goods_total_price = this.goods_sum_price * this.num;
                        }
                    } else {
                        // this.num += 1;
                        this.goods_total_price = this.goods_sum_price * this.num;
                    }
                } else {
                    if (this.num < 1) {
                        return false;
                    }
                    // this.num -= 1;
                    this.goods_total_price = this.goods_sum_price * this.num;
                }
                this.getFreight()
            },
            rightGoto(direction) {
                if ("next" == direction) {

                    var next = this.rightIndex + 1;

                    if (next <= Math.floor(galleryRight.slides.length / 4)) {
                        galleryRight.slideTo(next, 1000, false); //切换到第一个slide，速度为1秒
                        this.rightIndex = next;
                    } else {
                        galleryRight.activeIndex = -1
                    }
                }
                if ("prev" == direction) {
                    if (galleryRight.activeIndex == -1) {
                        this.rightIndex = Math.floor(galleryRight.slides.length / 4);
                    }
                    var prev = this.rightIndex - 1;
                    if (prev >= 0) {
                        galleryRight.slideTo(prev, 1000, false); //切换到第一个slide，速度为1秒
                        this.rightIndex = prev;
                    }
                }
            },
            slideTo(direction) {
                if (direction == "next") {
                    let next = this.currentIndex + 3;
                    galleryThumbs.slideTo(next, 1000, false); //切换到第一个slide，速度为1秒
                    this.currentIndex = next;
                    if (this.currentIndex >= galleryThumbs.slides.length - 1) {
                        this.currentIndex = galleryThumbs.slides.length - 1;
                    }
                }
                if (direction == "prev") {
                    let prev = this.currentIndex - 3;
                    galleryThumbs.slideTo(prev, 1000, false); //切换到第一个slide，速度为1秒
                    this.currentIndex = prev;
                    if (this.currentIndex <= 0) {
                        this.currentIndex = 0;
                    }

                }
            },
            goTo(url, type) {

                if (type == "detail") {
                    this.$router.push({
                        path: url
                    });
                    // this.id = this.$route.query.id;
                    // // this.cityIndex=0;
                    // // this.ctiyChildrenIndex=0;
                    // // this.cityOne=0;
                    // // this.cityTwo=0;
                    // // this.cityThree=0;
                    // this.isRu=false;
                    // this.isTu=false;
                    // this.num=1;
                    // this.getDetail();
                    galleryThumbs.slideTo(0, 1000, false); //切换到第一个slide，速度为1秒

                } else {
                    this.$router.push({
                        path: url
                    });
                }

            },
            openCity(evt, cityName) {

                document.querySelector("#" + cityName).scrollIntoView(true);
                var obj = this.$refs.test;
                if (!obj) {
                    return false
                }
                var _getHeight = null;
                _getHeight = obj.offsetTop;
                var two = document.getElementById("two");
                var twoHeight = two.offsetTop;
                var scrollTop =
                    document.documentElement.scrollTop || document.body.scrollTop;
                if (scrollTop < twoHeight + _getHeight) {
                    this.act = "one";

                } else {
                    this.act = "two";

                }


            },
            menuFixed(id) {
                var obj = this.$refs.test;
                if (!obj) {
                    return false
                }
                var _getHeight = null;
                _getHeight = obj.offsetTop;
                window.onscroll = () => {
                    this.changePos(id, _getHeight);
                    var two = document.getElementById("two");
                    if (!two) {
                        return false
                    }
                    var twoHeight = two.offsetTop;
                    var scrollTop =
                        document.documentElement.scrollTop || document.body.scrollTop;
                    var scrollBottom = document.documentElement.scrollHeight - document.documentElement.scrollTop - document.documentElement.clientHeight;

                    if (scrollTop < twoHeight + _getHeight) {
                        if (scrollBottom <= 0) {
                            this.act = "two";
                            return false;
                        }
                        this.act = "one";
                    } else {
                        this.act = "two";
                    }
                };


            },
            changePos(id, height) {
                var obj = document.getElementById(id);
                if (!obj) {
                    return false
                }
                var scrollTop =
                    document.documentElement.scrollTop || document.body.scrollTop;
                if (scrollTop < height) {
                    obj.style.position = "relative";
                    // obj.style.top = "20px";
                    obj.style.zIndex = "0";
                } else {
                    obj.style.position = "fixed";
                    obj.style.top = "0px";
                    obj.style.zIndex = "9999999";
                }
            },
            addShopping() {
                this.addShow1 = true;
                this.$HttpGet("/index.php?s=/admin/home.cart/add", {
                    goods_id: this.detail.id,
                    goods_num: this.num,
                    goods_sku_id: this.selectSku
                }).then(res => {
                    if (res.code == 0) {
                        this.$notifySuccess(res.msg);
                        this.$HttpGet("/index.php?s=/admin/home.cart/lists").then(res => {
                            this.$store.commit('CARNUM', res.data.goods_list.length)
                        })
                    }

                })
            },













            // getdetial() {
            //     this.$HttpGet("/index.php?s=/admin/goods/detail", this.params).then(res => {
            //         this.detialdata = res.data
            //         this.mainImgUrl = res.data.big_img
            //         this.imgUrlList = JSON.parse(this.detialdata.images)
            //         this.spec_many = this.detialdata.spec_many
            //         this.selectSku = this.detialdata.goods_sku.spec_sku_id
            //         console.log(this.imgUrlList, '4545');
            //         this.loading = false
            //     })
            // },
            changeImg(item, index) {
                this.activeIn = index
                this.mainImgUrl = item
            },
            handleChange(currentValue, oldValue) {
                console.log(currentValue, oldValue);
                if (currentValue > oldValue) {
                    this.modinfyNum('add')
                } else {
                    this.modinfyNum('reduce')
                }
            },
            tabshandleClick(tab, event) {
                console.log(tab, event);
            },
            openCity(evt, cityName) {

                document.querySelector("#" + cityName).scrollIntoView(true);
                var obj = this.$refs.test;
                if (!obj) {
                    return false
                }
                var _getHeight = null;
                _getHeight = obj.offsetTop;
                var two = document.getElementById("two");
                var twoHeight = two.offsetTop;
                var scrollTop =
                    document.documentElement.scrollTop || document.body.scrollTop;
                if (scrollTop < twoHeight + _getHeight) {
                    this.act = "one";

                } else {
                    this.act = "two";

                }


            },
        }
    }
</script>
<!-- <script>
    import Swiper from "swiper/swiper-bundle.min.js";
    import "swiper/swiper-bundle.min.css";
    import lodash from "lodash"

    var galleryThumbs = null;
    var galleryTop = null;
    var galleryRight = null;
    // 记录规格的数组
    let goodsSpecArr = [];
    // 记录运费
    let freightArr = [];
    let mapItemId = {};
    let mapChecked = {};
    export default {
        name: "detail",
        data() {
            return {
                taxation:0.091,//税率
                taxationFee:0,//税费
                min_price: 0,
                max_price: 0,
                numCI: ["重量", "数量", "罐", "盒", "件", "套", "瓶","组", "支", "袋", '个', "台", "面", "辆", "匹", "只", "块", "点", "条", "滴", "片", "寸", "米", "尺", "千克", "克拉", "吨", "瓶", "盒", "杯", "箱", "桶", "罐", "群", "双", "束","对","包","根"],
                dateCI :["生产日期","日期","有效期","无效期"],
                unit: "",
                loading: true,
                act: "one",
                currentIndex: 0,
                rightIndex: 0,
                // options: regionData,
                dialogForm: {
                    name: "",
                    selectProv: "",
                    selectCity: "",
                    selectCountry: "",
                    mark: "",
                },
                selectItems: [],
                rules: {
                    name: [{required: true, message: "请输入街道名称", trigger: "blur"}],
                    selectProv: [
                        {required: true, message: "请选择省份", trigger: "change"},
                    ],
                    selectCity: [
                        {required: true, message: "请选择城市", trigger: "change"},
                    ],
                    selectCountry: [
                        {required: true, message: "请选择市区", trigger: "change"},
                    ],
                },
                dialogFormFenLeiVisible: false,
                multipleSelection: [],
                isActive: true,
                id: "",
                num: 1,
                inventory: 0,
                formData: {},
                addRess: [],
                search: '',
                addShow1: false,
                cityOne: '',
                cityTwo: '',
                cityThree: '',
                twoArr: [],
                threeArr: [],
                cityIndex: null,
                ctiyChildrenIndex: null,
                opt: null,
                goodsID: '',
                freight: 0,
                btnShow: true,
                priceGoods: null,
                goodsMultiSpec: {}, // 多规格信息
                generalProductLifeList: [],
                activityProductLifeList:[],
                freightForm: null,           // 运费
                goodsListPrice: 0, //单价
                goods_total_price: 0,//总价,
                skuNum: 1,
                skuPrice: 0,
                nmShow: false,




                activeAct:1,// 1活动商品
                detail: null,//商品详情
                selectSku:"",//当前选择规格
                sku:null,//html规格循环
                skuCoverImage:"",//规格图片
                skuPrices:{},//规格价格和数量
                dataArr:null,//商品数据
                curAct:[],//当前选择规格数组形式
                isRu : false,//判断规格是否包含数量名词
                isTu : false,//判断规格是否包含日期名词
                yesSku : [],//运费关联可选规格(日期),
                yesSku1 : [],//运费关联可选规格(数量),
                noSK : [],//所有可选规格
                onePrice: 0,//单价
                stock_num: 0,//数量
                goods_sum_price: 0,//商品总价
                ar:[]

            };
        },

        created() {
            this.id = this.$route.query.id;
            this.getDetail();
            // this.getAddres();
            this.childClick();


        },
        watch: {
            $route: function (newVal) {
                this.id = newVal.query.id;
                this.isRu=false;
                this.isTu=false;
                this.num=1;
                this.getDetail();
            },
            cityIndex() {
                this.twoArr = this.opt[this.cityIndex].children;
                this.threeArr = this.opt[this.cityIndex].children[this.ctiyChildrenIndex].children;
            },
            ctiyChildrenIndex() {
                this.threeArr = this.opt[this.cityIndex].children[this.ctiyChildrenIndex].children;
            },
        },
        mounted() {


        },
        methods: {
            changPro(data){
                this.activeAct=data;
                this.isRu=false;
                this.isTu=false;
                this.initData();
            },
            numIn(e) {

                if (parseInt(this.stock_num) < parseInt(this.num)) {
                    this.$notifyError(`最多限购${this.stock_num}件`);
                    this.num = this.stock_num;
                }
                if (this.num == "") {
                    this.num = 0;
                }

                this.goods_total_price = parseFloat(this.goods_sum_price) * parseFloat(this.num);
                console.log(this.num)
            },
            getFreight() {
                var arr = [];
                arr.push(this.opt[this.cityOne].region_name);
                arr.push(this.opt[this.cityOne].children[this.cityTwo].region_name);
                arr.push(this.opt[this.cityOne].children[this.cityTwo].children[this.cityThree].region_name);
                this.btnShow = true;
                this.nmShow = false;

                // if (this.detail.source != "HD") {
                //     this.generalProductLifeList=[];
                //     this.activityProductLifeList=[];
                //     if(this.detail.spec_type==20){
                //         this.initData();
                //     }else{
                //
                //         this.onePrice=this.detail.goods_price?this.detail.goods_price:this.detail.single_price;
                //         this.selectSku=this.detail.goods_sku.spec_sku_id
                //         return false
                //     }
                //     return false;
                // }



                this.$HttpGet("/index.php?s=/admin/goods/getGoodPrice", {
                    goods_id: this.goodsID,
                    address: arr.join("|")
                }).then(res => {
                    if(res.data.length==0 || res.data==null){
                        this.generalProductLifeList=[];
                        this.activityProductLifeList=[];
                    }else{
                        this.generalProductLifeList=res.data.generalProductLifeList;
                        this.activityProductLifeList=res.data.activityProductLifeList;
                    }

                    if(res.data.generalProductLifeList==null){
                        this.generalProductLifeList=[];
                    }
                    if(res.data.activityProductLifeList==null){
                        this.activityProductLifeList=[];
                    }
                    if(this.activeAct==1 && (res.data.activityProductLifeList==null || res.data.activityProductLifeList.length==0)){
                        this.activeAct=0;
                    }
                    if (this.detail.source != "HD") {
                        // this.generalProductLifeList=[];
                        // this.activityProductLifeList=[];
                        if(this.detail.spec_type==20){
                            this.initData();
                        }else{

                            this.onePrice=this.detail.goods_price?this.detail.goods_price:this.detail.single_price;
                            this.selectSku=this.detail.goods_sku.spec_sku_id
                            return false
                        }
                        return false;
                    }
                    if(this.detail.spec_type==20){
                        this.initData();
                        console.log(this.sku)
                    }else{
                        this.onePrice=this.detail.goods_price?this.detail.goods_price:this.detail.single_price;
                        return false
                    }
                })
            },
            oneCity(index) {
                this.cityIndex = index;
                this.ctiyChildrenIndex = 0;
                this.cityTwo = 0;
                this.cityThree = 0;
                this.isRu=false;
                this.isTu=false;
                this.nmShow=false;
                this.selectSku="";
                // this.num=1;
                this.activeAct=this.detail.is_activity;
                this.getFreight();
            },
            twoCity(index) {
                this.isRu=false;
                this.isTu=false;
                this.ctiyChildrenIndex = index;
                this.cityThree = 0;
                // this.num=1;
                this.activeAct=this.detail.is_activity;
                this.getFreight();
            },
            threeCity(index) {
                this.isRu=false;
                this.isTu=false;
                // this.num=1;
                this.activeAct=this.detail.is_activity;
                this.getFreight();
            },
            getAddressList() {
                this.$HttpGet("/index.php?s=/admin/home.address/getcachetree").then(res => {
                    this.opt = res.data;
                    var bz = false;
                    var region = null;
                    for (let i = 0; i < this.addRess.length; i++) {
                        if (this.addRess[i].is_status == 1) {
                            bz = true;
                            region = this.addRess[i].region;
                            break;
                        }
                    }
                    console.log(this.addRess)

                    //用户地址
                    // if (bz || (bz == false && this.addRess.length > 0)) {
                    //     region = this.addRess[0].region;
                    //     for (let i = 0; i < this.opt.length; i++) {
                    //
                    //         if (this.opt[i].region_name == region.province) {
                    //             this.cityOne = i;
                    //             this.cityIndex = i;
                    //         }
                    //     }
                    //
                    //     for (let i = 0; i < this.opt[this.cityOne].children.length; i++) {
                    //         if (this.opt[this.cityOne].children[i].region_name == region.city) {
                    //             this.cityTwo = i;
                    //             this.ctiyChildrenIndex = i;
                    //
                    //         }
                    //     }
                    //     for (let i = 0; i < this.opt[this.cityOne].children[this.cityTwo].children.length; i++) {
                    //         if (this.opt[this.cityOne].children[this.cityTwo].children[i].region_name == region.region) {
                    //             this.cityThree = i;
                    //         }
                    //     }
                    // } else {
                    //     this.cityIndex = 0;
                    //     this.ctiyChildrenIndex = 0;
                    //     this.cityOne = 0;
                    //     this.cityTwo = 0;
                    //     this.cityThree = 0;
                    // }
                    //默认地址
                    for (let i = 0; i < this.opt.length; i++) {

                        if (this.opt[i].region_name == "重庆市") {
                            this.cityOne = i;
                            this.cityIndex = i;
                        }
                    }

                    for (let i = 0; i < this.opt[this.cityOne].children.length; i++) {
                        if (this.opt[this.cityOne].children[i].region_name == "重庆市") {
                            this.cityTwo = i;
                            this.ctiyChildrenIndex = i;

                        }
                    }
                    for (let i = 0; i < this.opt[this.cityOne].children[this.cityTwo].children.length; i++) {
                        if (this.opt[this.cityOne].children[this.cityTwo].children[i].region_name == "渝中区") {
                            this.cityThree = i;
                        }
                    }
                    console.log(this.cityOne,this.cityIndex,this.cityTwo,this.ctiyChildrenIndex,this.cityThree,)
                    this.getFreight();
                })

            },


            /* 购物车动画开始*/
            addShopCart() {
                this.addShow = true
                setTimeout(() => {
                    this.addShow = false
                }, 1000)
            },
            addShopCart1() {
                this.addShow1 = true
            },

            // 动画钩子函数
            // 进入前状态
            beforeEnter(el) {

                el.style.left = '200px';
                el.style.top = '-25px';
                el.style.transform = 'scale(1)'
            },
            // 进入中
            enter(el, done) {

                // 需要调用元素的offset操作,才有过渡的效果,否则会马上实现过渡
                var wid = document.getElementById('jhd').getBoundingClientRect();
                var widp = document.getElementsByClassName('floatingWindow')[0].getBoundingClientRect();
                var width = document.body.clientWidth - wid.left + 70;
                // console.log('购物车', wid.top)
                // console.log('滚动条', document.documentElement.scrollTop)
                // console.log('右边', widp.top);
                el.offsetWidth;
                el.style.left = `${width}px`;
                el.style.top = `${widp.top - wid.top}px`;
                el.style.zIndex = '999';
                el.style.transform = 'scale(.5)';
                done()
            },
            // 进入后
            afterEnter() {
                this.addShow1 = false
            },

            // 新增
            addItem() {
                this.list.push(this.list.length + 1)
            },
            // 删除
            removeItem() {
                if (this.list.length > 1) {
                    this.list.pop()
                }
            },
            /* 购物车动画结束*/
            childClick() {
                this.$emit('chang', 'nav')
            },
            getAddres() {
                this.$HttpGet("/index.php?s=/admin/home.address/lists", {
                    search: this.search
                }).then(res => {
                    this.addRess = res.data.list.data;
                    this.getAddressList();
                })
            },

            cartesianProductOf(a) {
                return Array.prototype.reduce.call(arguments, function (a, b) {
                    var ret = [];
                    a.forEach(function (a) {
                        b.forEach(function (b) {
                            ret.push(a.concat([b]));
                        });
                    });
                    return retdetailtrade_type_name;
                }, [[]]);
            },
            onSwitchSpec(e,i,j) {
                let attrIdx = parseInt(e.currentTarget.dataset.attridx)?parseInt(e.currentTarget.dataset.attridx):i,
                    itemIdx = parseInt(e.currentTarget.dataset.itemidx)?parseInt(e.currentTarget.dataset.itemidx):j;
                let selectArr =this.selectSku.split("_");
                selectArr[attrIdx]=itemIdx+"";
                this.selectSku=selectArr.join("_");
                // this.num=1;
                this.enableData();
                if(this.noSK.indexOf(this.selectSku)==-1){
                    let se="";
                    for(let z=attrIdx+1;z<this.sku.length;z++){
                        for(let q=0;q<this.sku[z].spec_items.length;q++){
                            if(this.sku[z].spec_items[q].disabled){
                                this.sku[z].spec_items[q].checked=false;
                            }else{
                                this.sku[z].spec_items[q].checked=true;
                                se=(this.sku[z].spec_items[q].item_id)
                                break;
                            }
                        }
                        // debugger
                        selectArr[z]=se+"";
                        this.selectSku=selectArr.join("_");
                        this.enableData();
                    }
                }else{
                    // debugger
                    for(let z=0;z<this.sku.length;z++){
                        for(let q=0;q<this.sku[z].spec_items.length;q++){
                            if(selectArr.indexOf(this.sku[z].spec_items[q].item_id+"")==-1){
                                this.sku[z].spec_items[q].checked=false;
                            }else{
                                this.sku[z].spec_items[q].checked=true;
                            }
                        }
                    }
                }
                this._updateSpecGoods();
                // console.log(this.data.sku)
                // debugger

            },
            /**
             * 更新商品规格信息
             */
            _updateSpecGoods() {
                let sku=this.selectSku;
                this.skuPrice=this.skuPrices[sku][0];
                this.skuNum=this.skuPrices[sku][1];
                this.goods_sum_price=this.skuPrices[sku][0];
                this.goods_total_price=this.skuPrices[sku][0];
                let data=null;
                if(this.activeAct==1){
                    //活动运费
                    data=this.activityProductLifeList
                }else{
                    //常规运费
                    data=this.generalProductLifeList
                }
                let freightForm = null;
                // 设置运费
                for (let j in data) {
                    if (this.curAct.indexOf(data[j].life) != -1 && this.curAct.indexOf(data[j].productNum.toString()) != -1 && this.detail.source == "HD") {
                        freightForm = data[j];
                        break;
                    }
                    // debugger
                    if (this.detail.source != "HD") {
                        var a=new Set(data[j].spec_attr.split("_"));
                        var b=new Set(this.curAct);
                        // 差集
                        let difference= Array.from(new Set([...b].filter(x=>!a.has(x))))
                        let difference1= Array.from(new Set([...a].filter(x=>!b.has(x))))
                        if(difference.length==0 && difference1==0){
                            freightForm = data[j];
                            break;
                        }

                    }
                }
                // console.log(this.data.skuPrices,this.data.selectSku)
                // debugger
                let stock_num=this.skuPrices[this.selectSku][2].form.stock_num;
                let goods_price=this.skuPrices[this.selectSku][0]
                // debugger

                this.skuPrice=parseFloat( this.skuPrice);
                this.skuNum=parseFloat( this.skuNum);
                this.goods_sum_price=parseFloat( this.goods_sum_price);
                this.goods_total_price=parseFloat( this.goods_total_price) * parseFloat( this.num);
                this.freightForm=freightForm;
                this.stock_num=stock_num;
                this.goods_price=goods_price;
                this.onePrice=(this.skuPrice / this.skuNum).toFixed(2)!="NaN"?(this.skuPrice / this.skuNum).toFixed(2):0;
                this.taxationFee=((this.goods_sum_price+(freightForm && freightForm.freightMoney || 0))/(1+this.taxation)*this.taxation).toFixed(2)

                this.nmShow=true
            },
            taxationCount(money){
                console.log("money",money)
                //税费=商品价格/（1+税率）*税率
                let moneyTaxation=money/(1+this.taxation)*this.taxation;
                return moneyTaxation;
            },
            /**
             * 初始化商品多规格
             */
            initData() {
                if (this.detail.spec_type == 20) {

                    let numId={};//数量item_id
                    let numArr=[];
                    let priceArr=[];//规格单价
                    let minPric=0;//最小单价
                    let itemIds=[];
                    let priceMinSku="";//最小单价规格
                    let showSkuIds=[];//可显示规格id数组
                    let min = 99999999;
                    let ProductLifeList =[];//运费列表
                    let CI=this.numCI.concat(this.dateCI);
                    // 规格数据排序
                    this.dataSort(this.goodsMultiSpec);

                    //数量单位规格 重复代码后面再优化
                    for(let i=0;i<this.goodsMultiSpec.spec_attr.length;i++){
                        if(this.detail.source != "HD" && !this.isRu && this.goodsMultiSpec.spec_attr.length==1 && this.numCI.indexOf(this.goodsMultiSpec.spec_attr[i].group_name)!=-1 && this.$isNumber(this.goodsMultiSpec.spec_attr[0].spec_items[0].spec_value)){
                            this.isRu = true;
                            for(let j=0;j<this.goodsMultiSpec.spec_attr[i].spec_items.length;j++){
                                let name=this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id;
                                numId[name]=this.goodsMultiSpec.spec_attr[i].spec_items[j].spec_value;
                                numArr.push(this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id)
                            }
                        }
                        if(i==1 && !this.isRu && this.detail.source != "HD" && this.$isNumber(this.goodsMultiSpec.spec_attr[i].spec_items[0].spec_value)){
                            this.isRu = true;
                            for(let j=0;j<this.goodsMultiSpec.spec_attr[i].spec_items.length;j++){
                                let name=this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id;
                                numId[name]=this.goodsMultiSpec.spec_attr[i].spec_items[j].spec_value;
                                numArr.push(this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id)
                            }
                        }
                        if(this.numCI.indexOf(this.goodsMultiSpec.spec_attr[i].group_name)!=-1 && !this.isRu && this.detail.source == "HD"){
                            this.isRu = true;
                            for(let j=0;j<this.goodsMultiSpec.spec_attr[i].spec_items.length;j++){
                                let name=this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id;
                                numId[name]=this.goodsMultiSpec.spec_attr[i].spec_items[j].spec_value;
                                numArr.push(this.goodsMultiSpec.spec_attr[i].spec_items[j].item_id)
                            }
                            // break;
                        }
                        if(this.dateCI.indexOf(this.goodsMultiSpec.spec_attr[i].group_name)!=-1 && !this.isTu){
                            this.isTu = true;
                            // break;
                        }
                    }

                    // this.setData({
                    //     isTu:this.data.isTu,
                    //     isRu:this.data.isRu,
                    // })


                    //关联运费 规格顺序问题 还待测试
                    if(this.activeAct==1){
                        ProductLifeList=this.activityProductLifeList
                    }else{
                        ProductLifeList=this.generalProductLifeList
                    }
                    let attr=this.goodsMultiSpec.spec_attr;
                    let yesSku=[];
                    let yesSku1=[];
                    let ar=[];
                    for(let h=0;h<ProductLifeList.length;h++){
                        let lifeArr=[];
                        if(this.detail.source != "HD"){
                            // debugger
                            lifeArr=ProductLifeList[h].spec_attr.split("_");
                            let pr=[]
                            for(let vs=0;vs<attr.length;vs++){
                                for(let vc=0;vc<attr[vs].spec_items.length;vc++){
                                    if(lifeArr.indexOf(attr[vs].spec_items[vc].spec_value)!=-1){
                                        pr.push(attr[vs].spec_items[vc].item_id+"")
                                    }
                                }
                            }
                            ar.push(pr)
                        }else {
                            lifeArr=[
                                ProductLifeList[h].life+"",//日期
                                ProductLifeList[h].productNum+"",//数量
                            ];
                        }
                        let conca="_"
                        for(let vs=0;vs<attr.length;vs++){
                            for(let vc=0;vc<attr[vs].spec_items.length;vc++){
                                // if(lifeArr.indexOf(attr[vs].spec_items[vc].spec_value+"")!=-1 && CI.indexOf(attr[vs].group_name)!=-1 ){
                                //   conca+=attr[vs].spec_items[vc].item_id + "_"
                                // }
                                if(lifeArr.indexOf(attr[vs].spec_items[vc].spec_value+"")!=-1 && this.dateCI.indexOf(attr[vs].group_name)!=-1 ){
                                    yesSku.push(attr[vs].spec_items[vc].item_id)
                                }
                                if(lifeArr.indexOf(attr[vs].spec_items[vc].spec_value+"")!=-1 && this.numCI.indexOf(attr[vs].group_name)!=-1 ){
                                    yesSku1.push(attr[vs].spec_items[vc].item_id)
                                }
                            }
                        }
                        // conca=conca.slice(1,conca.length-1)
                        // yesSku.push(conca)
                    }
                    this.ar=ar;
                    yesSku=Array.from(new Set(yesSku));
                    yesSku1=Array.from(new Set(yesSku1));
                    this.yesSku=yesSku;
                    this.yesSku1=yesSku1;
                    // console.log(yesSku,yesSku1)
                    // debugger



                    //没有数量单位才做
                    if(!this.isRu){
                        let seKu=""
                        for(let f=0;f<this.goodsMultiSpec.spec_list.length;f++){
                            let price=this.goodsMultiSpec.spec_list[f].form.goods_price;
                            // if(this.detail.source != "HD"){
                            let bz=false
                            let a=new Set(this.goodsMultiSpec.spec_list[f].spec_sku_id.split('_'));
                            let b=null;
                            for(let i=0;i<ar.length;i++){
                                b=new Set(ar[i])
                                let difference= Array.from(new Set([...a].filter(x=>!b.has(x))))
                                if(difference.length==0){
                                    bz=true
                                    break;
                                }
                            }
                            // }
                            if(parseFloat(price) < min && this.goodsMultiSpec.spec_list[f].form.stock_num > 0 && bz){
                                min = parseFloat(price)
                                seKu=this.goodsMultiSpec.spec_list[f].spec_sku_id;
                            }
                            this.skuPrices[this.goodsMultiSpec.spec_list[f].spec_sku_id]=[this.goodsMultiSpec.spec_list[f].form.goods_price,1,this.goodsMultiSpec.spec_list[f]]
                        }
                        if(ProductLifeList.length==0){
                            seKu=""
                        }
                        // debugger
                        if(seKu==""){
                            this.sku=this.goodsMultiSpec.spec_attr;
                            for(let g=0;g<this.sku.length;g++){
                                for(let s=0;s<this.sku[g].spec_items.length;s++){
                                    this.sku[g].spec_items[s].disabled=true;
                                    this.sku[g].spec_items[s].checked=false;
                                }
                            }
                            this.selectSku="";
                            this.onePrice=0;
                            this.goods_sum_price=0;
                            this.goods_total_price=0;
                            this.freightForm=0;
                            this.nmShow=true;
                            return false
                        }
                        this.selectSku=seKu;
                        this.sku=this.goodsMultiSpec.spec_attr;

                        // this.setData({
                        //     selectSku:seKu,
                        //     sku:this.data.goodsMultiSpec.spec_attr,
                        //     isRu:this.data.isRu,
                        //     isTu:this.data.isTu,
                        // })

                        this.enableData();
                        this._updateSpecGoods();
                        return false

                    }
                    //规格价格
                    for(let i=0;i<this.goodsMultiSpec.spec_list.length;i++){
                        let arr=this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_");
                        showSkuIds.push(...arr);
                        //关联运费   规格顺序问题 还待测试
                        let isTr=false;
                        let isTr1=false;
                        if(this.activeAct==1){
                            for(let to=0;to<yesSku.length;to++){
                                let id=this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if(id.indexOf(yesSku[to] + "")!=-1 ){
                                    isTr=true;
                                    break;
                                }
                            }
                            for(let to=0;to<yesSku1.length;to++){
                                let id=this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if(id.indexOf(yesSku1[to] + "")!=-1 ){
                                    isTr1=true;
                                    break;
                                }
                            }
                        }else{
                            for(let to=0;to<yesSku.length;to++){
                                let id=this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if(id.indexOf(yesSku[to] + "")!=-1 ){
                                    isTr=true;
                                    break;
                                }
                            }
                            for(let to=0;to<yesSku1.length;to++){
                                let id=this.goodsMultiSpec.spec_list[i].spec_sku_id.split("_")
                                if(id.indexOf(yesSku1[to] + "")!=-1 ){
                                    isTr1=true;
                                    break;
                                }
                            }
                        }
                        if(this.detail.source != "HD"){
                            isTr=false;
                            isTr1=false;
                            let a=new Set(this.goodsMultiSpec.spec_list[i].spec_sku_id.split('_'));
                            let b=null;
                            for(let i=0;i<ar.length;i++){
                                b=new Set(ar[i])
                                let difference= Array.from(new Set([...a].filter(x=>!b.has(x))))
                                if(difference.length==0){
                                    isTr=true;
                                    isTr1=true;
                                    break;
                                }
                            }
                        }
                        if(!this.isTu){
                            isTr=true;
                        }
                        if(!this.isRu){
                            isTr1=true;
                        }
                        //自营商品
                        // if(this.detail.source != "HD"){
                        //     isTr=true;
                        //     isTr1=true;
                        // }
                        for(let j=0;j<arr.length;j++){
                            //不是活动商品
                            if(numArr.indexOf(parseInt(arr[j]))!=-1 && this.goodsMultiSpec.spec_list[i].form.stock_num>0 && this.activeAct!=1){
                                let money=parseFloat(this.goodsMultiSpec.spec_list[i].form.goods_price)/parseFloat(numId[arr[j]]);
                                // 如果不和运费接口关联 去掉 isTr 条件
                                if(this.goodsMultiSpec.spec_list[i].form.is_activity!=1 && isTr && isTr1 ){
                                    priceArr.push(money)
                                    itemIds.push(this.goodsMultiSpec.spec_list[i].spec_sku_id);
                                    this.skuPrices[this.goodsMultiSpec.spec_list[i].spec_sku_id]=[this.goodsMultiSpec.spec_list[i].form.goods_price,numId[arr[j]],this.goodsMultiSpec.spec_list[i]]
                                }

                            }
                            //活动商品
                            if(this.activeAct==1 && numArr.indexOf(parseInt(arr[j]))!=-1 && this.goodsMultiSpec.spec_list[i].form.stock_num>0){
                                let money=parseFloat(this.goodsMultiSpec.spec_list[i].form.goods_price)/parseFloat(numId[arr[j]]);
                                if(this.goodsMultiSpec.spec_list[i].form.is_activity==1 && isTr && isTr1){
                                    priceArr.push(money)
                                    itemIds.push(this.goodsMultiSpec.spec_list[i].spec_sku_id);
                                    this.skuPrices[this.goodsMultiSpec.spec_list[i].spec_sku_id]=[this.goodsMultiSpec.spec_list[i].form.goods_price,numId[arr[j]],this.goodsMultiSpec.spec_list[i]]
                                }

                            }
                        }
                    }
                    // debugger
                    //如果没有规格可选择
                    if(priceArr.length==0){
                        this.sku=this.goodsMultiSpec.spec_attr;
                        for(let g=0;g<this.sku.length;g++){
                            for(let s=0;s<this.sku[g].spec_items.length;s++){
                                this.sku[g].spec_items[s].disabled=true;
                                this.sku[g].spec_items[s].checked=false;
                            }
                        }
                        this.selectSku="";
                        this.onePrice=0;
                        this.goods_sum_price=0;
                        this.goods_total_price=0;
                        this.freightForm=0;
                        this.nmShow=true;
                        // this.setData({
                        //     sku:this.data.sku,
                        //     selectSku:"",
                        //     onePrice:0,
                        //     goods_sum_price :0,
                        //     freightForm:0,
                        //     isLoad:false
                        // })


                        return false
                    }

                    minPric=Math.min(...priceArr);
                    this.onePrice=parseFloat(minPric).toFixed(2)

                    let index=priceArr.indexOf(minPric)!=-1 ? priceArr.indexOf(minPric) : 0;

                    priceMinSku=itemIds[index];
                    this.selectSku=priceMinSku;
                    let Ids =Array.from(new Set(showSkuIds)) ;
                    let showSk=JSON.parse(JSON.stringify(this.goodsMultiSpec.spec_attr));

                    // debugger
                    for(let m=0;m<this.goodsMultiSpec.spec_attr.length;m++){
                        showSk[m].spec_items=[];
                        for(let n=0;n<this.goodsMultiSpec.spec_attr[m].spec_items.length;n++){
                            let id= this.goodsMultiSpec.spec_attr[m].spec_items[n].item_id;
                            showSk[m].spec_items.push(this.goodsMultiSpec.spec_attr[m].spec_items[n]);
                            showSk[m].spec_items[n].disabled=false;
                            showSk[m].spec_items[n].checked=false;
                            if(Ids.indexOf(id+"")!=-1){
                                let arr =priceMinSku.split("_")
                                showSk[m].spec_items[n].disabled=false;
                                if(arr.indexOf(showSk[m].spec_items[n].item_id+"")!=-1){
                                    showSk[m].spec_items[n].checked=true;
                                }else {
                                    showSk[m].spec_items[n].checked=false;
                                }

                            }
                        }
                    }
                    //排序
                    showSk.forEach((item, i) => {
                        item.spec_items.sort((a, b) => a['spec_value'] - b['spec_value']);
                    });
                    this.sku=showSk;
                    this.enableData();
                    this._updateSpecGoods();


                }
            },
            enableData() {
                let selectArr =this.selectSku.split("_");
                let dipalyAct=[];
                for(let x=0;x<selectArr.length;x++){
                    for(let y=0;y<this.goodsMultiSpec.spec_list.length;y++){
                        let arrs=this.goodsMultiSpec.spec_list[y].spec_sku_id.split("_");
                        if(arrs.indexOf(selectArr[x])!=-1 && this.goodsMultiSpec.spec_list[y].form.stock_num > 0){
                            dipalyAct.push(...arrs)
                        }

                    }
                }
                let Idss =Array.from(new Set(dipalyAct));
                let skuNum={};
                let noSkuNum={};//可选择
                for(let u=0;u<this.sku.length;u++){
                    let sku=[];

                    for(let ns=0;ns<this.sku[u].spec_items.length;ns++){
                        let bz=0;
                        let nbz=0;
                        this.sku[u].spec_items[ns].disabled=false;
                        this.sku[u].spec_items[ns].checked=false;
                        if(selectArr.indexOf(this.sku[u].spec_items[ns].item_id+"")!=-1){
                            this.sku[u].spec_items[ns].checked=true;
                        }
                        noSkuNum[this.sku[u].spec_items[ns].item_id]=[];
                        for(let k=0;k<this.goodsMultiSpec.spec_list.length;k++){
                            let ar=this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_");
                            //关联运费   规格顺序问题 还待测试
                            let isTr=false;
                            let isTr1=false;
                            if(this.activeAct==1){
                                for(let to=0;to<this.yesSku.length;to++){
                                    let id=this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if(id.indexOf(this.yesSku[to]+"")!=-1){
                                        isTr=true;
                                        break;
                                    }
                                }
                                for(let to=0;to<this.yesSku1.length;to++){
                                    let id=this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if(id.indexOf(this.yesSku1[to]+"")!=-1 ){
                                        isTr1=true;
                                        break;
                                    }
                                }
                            }else{
                                for(let to=0;to<this.yesSku.length;to++){
                                    let id=this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if(id.indexOf(this.yesSku[to]+"")!=-1){
                                        isTr=true;
                                        break;
                                    }
                                }
                                for(let to=0;to<this.yesSku1.length;to++){
                                    let id=this.goodsMultiSpec.spec_list[k].spec_sku_id.split("_")
                                    if(id.indexOf(this.yesSku1[to]+"")!=-1 ){
                                        isTr1=true;
                                        break;
                                    }
                                }
                            }
                            if(this.detail.source != "HD"){
                                isTr=false;
                                isTr1=false;
                                let a=new Set(this.goodsMultiSpec.spec_list[k].spec_sku_id.split('_'));
                                let b=null;
                                for(let i=0;i<this.ar.length;i++){
                                    b=new Set(this.ar[i])
                                    let difference= Array.from(new Set([...a].filter(x=>!b.has(x))))
                                    if(difference.length==0){
                                        isTr=true;
                                        isTr1=true;
                                        break;
                                    }
                                }
                            }
                            if(!this.isRu){
                                isTr1=true;
                            }
                            if(!this.isTu){
                                isTr=true;
                            }
                            //自营商品
                            // if(this.detail.source != "HD"){
                            //     isTr=true;
                            //     isTr1=true;
                            // }
                            //不是活动
                            if(ar.indexOf(this.sku[u].spec_items[ns].item_id+"")!=-1 && this.goodsMultiSpec.spec_list[k].form.stock_num > 0 && this.activeAct!=1){
                                // 如果不和运费接口关联 去掉 isTr 条件
                                if(this.goodsMultiSpec.spec_list[k].form.is_activity!=1 && isTr && isTr1){
                                    noSkuNum[this.sku[u].spec_items[ns].item_id].push(this.goodsMultiSpec.spec_list[k].spec_sku_id)
                                }
                            }
                            //是活动
                            if(ar.indexOf(this.sku[u].spec_items[ns].item_id+"")!=-1 && this.goodsMultiSpec.spec_list[k].form.stock_num > 0 && this.activeAct==1){
                                if(this.goodsMultiSpec.spec_list[k].form.is_activity==1 && isTr && isTr1){
                                    noSkuNum[this.sku[u].spec_items[ns].item_id].push(this.goodsMultiSpec.spec_list[k].spec_sku_id)
                                }
                            }
                        }
                        if(Idss.indexOf(this.sku[u].spec_items[ns].item_id+"") == -1){
                            sku.push(ns)
                        }
                    };
                }
// debugger
                let no=[];
                let sele=this.selectSku.split("_");
                let addSele="_";
                let up=[];
                let down=[];
                for(let kk=0;kk<sele.length;kk++){
                    //向上
                    if(kk==1){
                        for(let r1=0;r1<noSkuNum[sele[kk]].length;r1++){
                            let ars=noSkuNum[sele[kk]][r1].split("_");
                            for(let o=0;o<ars.length;o++){
                                if(ars[o]==sele[kk]){
                                    up.push(ars[o-1])
                                    break
                                }
                            }

                        }
                    }
                    //向下
                    if(kk<sele.length){
                        let ljq="_";
                        for(let c=0; c<=kk;c++){
                            ljq=ljq+sele[c]+"_"
                        }
                        ljq=ljq.slice(1,ljq.length);
                        // debugger
                        for(let r2=0;r2<noSkuNum[sele[kk]].length;r2++){
                            let arss=noSkuNum[sele[kk]][r2].split("_");
                            let bn="_";
                            for(let o=0;o<arss.length;o++){
                                bn=bn+arss[o]+"_"
                                let bs=bn.slice(1,bn.length);
                                if(bs==ljq){
                                    down.push(arss[o+1])
                                    break
                                }
                            }
                        }
                    }


                }
                up=Array.from(new Set(up));
                down=Array.from(new Set(down));
                no=up.concat(down);
                console.log("meiyou ",up,down)
                // debugger
                this.curAct=[];
                for(let w=0;w<this.sku.length;w++){
                    for(let m=0;m<this.sku[w].spec_items.length;m++){
                        if(no.indexOf(this.sku[w].spec_items[m].item_id+"")!=-1){
                            this.sku[w].spec_items[m].disabled=false
                        }else{
                            this.sku[w].spec_items[m].disabled=true
                        }
                        if(this.sku[w].spec_items[m].checked){
                            this.curAct.push(this.sku[w].spec_items[m].spec_value)
                        }
                    }
                }

                for(let cnm=0;cnm<this.sku[0].spec_items.length;cnm++){
                    if(noSkuNum[this.sku[0].spec_items[cnm].item_id].length!=0){
                        this.sku[0].spec_items[cnm].disabled=false
                    }
                }
                let noSK=[];
                for(let item in noSkuNum){
                    noSK=noSK.concat(noSkuNum[item])
                }
                noSK=Array.from(new Set(noSK))
                this.noSK=noSK
                // this.setData({
                //     sku:this.data.sku,
                //     curAct:this.data.curAct,
                //     noSK:noSK
                // })
            },


            // 数据排序
            dataSort(data) {
                let sku_id = data.spec_list[0].spec_sku_id.split("_");
                let arr = [];
                // debugger
                for (let i in sku_id) {
                    arr.push(this.setAttrSort(data, sku_id[i]));
                }
                data.spec_attr = arr;
            },
            // 对attr数据进行排序
            setAttrSort(data, id) {
                for (let i in data.spec_attr) {
                    let child = data.spec_attr[i].spec_items;
                    for (let j in child) {
                        if (child[j].item_id == id) {
                            return data.spec_attr[i];
                        }
                    }
                }
                return {};
            },
            getDetail() {
                const that = this;
                this.$HttpGet(`/index.php?s=/admin/goods/detail&goods_id=${this.id}&type=pc`).then(res => {
                    if(res.code!=0){
                        return  false
                    }
                    if(res.data.length==0){
                        this.$notifyError(res.msg);
                        this.$router.push("/index/commodity/home?type_name=0");
                        return false;
                    }
                    this.min_price =parseFloat(res.data.min_price);
                    this.max_price = parseFloat(res.data.max_price);
                    // debugger
                    this.goodsID = res.data.goods_id;
                    this.unit = res.data.unit;

                    this.detail=res.data;
                    this.goodsMultiSpec=res.data.spec_many;
                    this.dataArr=res.data;
                    this.sku=res.data.spec_many.spec_attr;
                    if(res.data.is_activity==1){
                        this.activeAct=1;
                    }else {
                        this.activeAct=3;
                    }
                    this.getAddres();

                    this.$nextTick(() => {
                        this.menuFixed("tab");
                        galleryRight && galleryRight.destroy(false, false); //销毁;
                        galleryThumbs && galleryThumbs.destroy(false, false);
                        galleryTop && galleryTop.destroy(false, false);
                        galleryRight = new Swiper(".gallery-right", {
                            direction: "vertical",
                            spaceBetween: 4,
                            slidesPerView: 1,
                            initialSlide: 0,
                            updateOnImagesReady: true,
                            // autoplay:true,//等同于以下设置
                            autoplay: {
                                delay: 3000,
                                stopOnLastSlide: false,
                                disableOnInteraction: false,
                            },
                            on: {
                                autoplay: function () {
                                    if (this.activeIndex >= Math.floor(galleryRight.slides.length / 4)) {
                                        this.activeIndex = -1;
                                    }
                                    that.rightIndex = this.activeIndex;
                                },
                            },
                        });
                        galleryThumbs = new Swiper(".gallery-thumbs", {
                            // loop: true,
                            spaceBetween: 15,
                            slidesPerView: 3,
                            initialSlide: 0,
                            freeMode: true,
                            watchSlidesVisibility: true,
                            watchSlidesProgress: true,
                            autoScrollOffset: 1,
                            updateOnImagesReady: true,
                            on: {
                                click: function () {
                                    that.currentIndex = this.clickedIndex + 1;
                                },
                            },
                        });
                        galleryTop = new Swiper(".gallery-top", {
                            spaceBetween: 0,
                            //  direction : 'vertical',
                            // loop: true,
                            autoHeight: true, //高度随内容变化
                            effect: 'fade',
                            initialSlide: 0,
                            thumbs: {
                                swiper: galleryThumbs,
                            },

                        });

                    })
                    this.loading = false
                }).catch((e)=>{
                    console.log(e)
                })
            },

            modinfyNum(type) {
                this.num = parseInt(this.num)
                if (type == "add") {

                    if (this.stock_num > 0) {
                        if (this.num >= this.stock_num) {
                            this.$notifyError("你已超过最大购买数量");
                        } else {
                            this.num += 1;
                            this.goods_total_price = this.goods_sum_price * this.num;
                        }
                    } else {
                        this.num += 1;
                        this.goods_total_price = this.goods_sum_price * this.num;
                    }
                } else {
                    if (this.num <= 1) {
                        return false;
                    }
                    this.num -= 1;
                    this.goods_total_price = this.goods_sum_price * this.num;
                }
            },
            rightGoto(direction) {
                if ("next" == direction) {

                    var next = this.rightIndex + 1;

                    if (next <= Math.floor(galleryRight.slides.length / 4)) {
                        galleryRight.slideTo(next, 1000, false); //切换到第一个slide，速度为1秒
                        this.rightIndex = next;
                    } else {
                        galleryRight.activeIndex = -1
                    }
                }
                if ("prev" == direction) {
                    if (galleryRight.activeIndex == -1) {
                        this.rightIndex = Math.floor(galleryRight.slides.length / 4);
                    }
                    var prev = this.rightIndex - 1;
                    if (prev >= 0) {
                        galleryRight.slideTo(prev, 1000, false); //切换到第一个slide，速度为1秒
                        this.rightIndex = prev;
                    }
                }
            },
            slideTo(direction) {
                if (direction == "next") {
                    let next = this.currentIndex + 3;
                    galleryThumbs.slideTo(next, 1000, false); //切换到第一个slide，速度为1秒
                    this.currentIndex = next;
                    if (this.currentIndex >= galleryThumbs.slides.length - 1) {
                        this.currentIndex = galleryThumbs.slides.length - 1;
                    }
                }
                if (direction == "prev") {
                    let prev = this.currentIndex - 3;
                    galleryThumbs.slideTo(prev, 1000, false); //切换到第一个slide，速度为1秒
                    this.currentIndex = prev;
                    if (this.currentIndex <= 0) {
                        this.currentIndex = 0;
                    }

                }
            },
            goTo(url, type) {

                if (type == "detail") {
                    this.$router.push({path: url});
                    // this.id = this.$route.query.id;
                    // // this.cityIndex=0;
                    // // this.ctiyChildrenIndex=0;
                    // // this.cityOne=0;
                    // // this.cityTwo=0;
                    // // this.cityThree=0;
                    // this.isRu=false;
                    // this.isTu=false;
                    // this.num=1;
                    // this.getDetail();
                    galleryThumbs.slideTo(0, 1000, false); //切换到第一个slide，速度为1秒

                } else {
                    this.$router.push({path: url});
                }

            },
            openCity(evt, cityName) {

                document.querySelector("#" + cityName).scrollIntoView(true);
                var obj = this.$refs.test;
                if (!obj) {
                    return false
                }
                var _getHeight = null;
                _getHeight = obj.offsetTop;
                var two = document.getElementById("two");
                var twoHeight = two.offsetTop;
                var scrollTop =
                    document.documentElement.scrollTop || document.body.scrollTop;
                if (scrollTop < twoHeight + _getHeight) {
                    this.act = "one";

                } else {
                    this.act = "two";

                }


            },
            menuFixed(id) {
                var obj = this.$refs.test;
                if (!obj) {
                    return false
                }
                var _getHeight = null;
                _getHeight = obj.offsetTop;
                window.onscroll = () => {
                    this.changePos(id, _getHeight);
                    var two = document.getElementById("two");
                    if (!two) {
                        return false
                    }
                    var twoHeight = two.offsetTop;
                    var scrollTop =
                        document.documentElement.scrollTop || document.body.scrollTop;
                    var scrollBottom = document.documentElement.scrollHeight - document.documentElement.scrollTop - document.documentElement.clientHeight;

                    if (scrollTop < twoHeight + _getHeight) {
                        if (scrollBottom <= 0) {
                            this.act = "two";
                            return false;
                        }
                        this.act = "one";
                    } else {
                        this.act = "two";
                    }
                };


            },
            changePos(id, height) {
                var obj = document.getElementById(id);
                if (!obj) {
                    return false
                }
                var scrollTop =
                    document.documentElement.scrollTop || document.body.scrollTop;
                if (scrollTop < height) {
                    obj.style.position = "relative";
                    // obj.style.top = "20px";
                    obj.style.zIndex = "0";
                } else {
                    obj.style.position = "fixed";
                    obj.style.top = "0px";
                    obj.style.zIndex = "9999999";
                }
            },
            addShopping() {
                this.addShow1 = true;
                this.$HttpGet("/index.php?s=/admin/home.cart/add", {
                    goods_id: this.detail.id,
                    goods_num: this.num,
                    goods_sku_id: this.selectSku
                }).then(res => {
                    if (res.code == 0) {
                        this.$notifySuccess(res.msg);
                        this.$HttpGet("/index.php?s=/admin/home.cart/lists").then(res => {
                            this.$store.commit('CARNUM', res.data.goods_list.length)
                        })
                    }

                })
            }
        },
    };
</script> -->


<!-- <style lang="scss" scoped>
  .ac{
    color: #FFFFFF !important;
    background: #FC554C !important;
  }
  .activ{
    display: flex;
    height: 30px;
    padding:  0 20px;
    /*background: #666666;*/
    .one,.two{
      width: 50%;
      height: 100%;
      line-height: 30px;
      border: 1px solid #EEEEEE;
      text-align: center;
      cursor: pointer;
      background: #FFF8F8;
    }
    .one{
      display: flex;
      position: relative;
      text-align: center;
      div{
        &:first-child{
          position: absolute;
          top: 0;
          left: 0;
          width: 30px;
          height: 25px;
          line-height: 25px;
          background: #FFF8F8;
          border-radius: 0px 0px 8px 0px;
          font-size: 8px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #FC554C;
        }
        &:last-child{
          width: 100%;
          text-align: center;
        }

      }

    }
  }
  .isAct{
    /*border: 1px solid red !important;*/
    background: #FC554C !important;
    font-weight: bold;
    color: #FFFFFF;
  }
  .isa{
    width: 100% !important;
    div{
      &:last-child{
        text-align: left !important;
        padding-left: 42px !important;
      }
    }

  }
  .detail {
    position: relative;
    width: 100%;
    // height: 1800px;
    // background-color: rebeccapurple;
    margin: 0 auto;

    .conten {
      position: relative;
      width: 1020px;
      height: 100%;
      min-height: calc(100vh - 170px);

      margin: 0 auto;

      .title {
        position: relative;
        padding-top: 24px;

        font-size: 12px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #000000;
      }

      .displa {
        position: relative;
        width: 100%;
        margin-top: 20px;
        margin-bottom: 20px;
        background-color: #ffffff;
        padding-bottom: 20px;

        .displa_left {
          position: relative;
          width: 347px;
          height: 100%;
          float: left;
          padding-left: 10px;

          .displa_left_top {
            height: 450px;
            margin-bottom: 10px;
            padding-top: 10px;
            box-sizing: content-box;

            .gallery-top {
              height: auto;
              width: 100%;
              max-height: 100%;
            }
          }

          .displa_left_buttom {
            display: flex;
            justify-content: space-between;
            align-content: center;
            align-items: center;
            width: 100%;

            .but-button {
              width: 28px;
              height: 75px;
              line-height: 75px;
              text-align: center;
              background: #ffffff;
              border: 1px solid #e5e5e5;
              color: black;
              cursor: pointer;
            }

            .button-prev {
            }

            .gallery-thumbs {
              height: 20%;
              box-sizing: border-box;
              padding: 10px 0;
              margin: 0 15px;
              padding-left: 2px;
            }

            .gallery-thumbs .swiper-slide {
              width: 75px !important;
              height: 75px !important;
              margin-right: 19px !important;
              cursor: pointer

            }

            .gallery-thumbs .swiper-slide-thumb-active {
              width: 75px;
              height: 75px;
              margin-right: 19px;
              border: 2px solid #000000;
            }
          }

          .swiper-container {
            width: 100%;
            height: 300px;
            margin-left: auto;
            margin-right: auto;
          }

          .swiper-slide {
            background-size: cover;
            background-position: center;
            cursor: pointer
          }
        }

        .displa_right {
          position: relative;
          width: 663px;
          height: 100%;

          background: #ffffff;
          float: left;

          .right_info {
            width: 543px;
            height: 100%;
            float: left;
            margin: 0 auto;

            .pub {
              width: 482px;
              margin: 0 auto;
              margin-top: 20px;
            }

            .name {
              margin-top: 40px;
              align-content: center;
              align-items: center;
              font-size: 20px;
              color: #000000;
              font-weight: bold;

              .commodity_type {
                display: inline-block;
                min-width: 59px;
                height: 20px;
                background: #e93e5d;
                border-radius: 8px;
                font-size: 11px;
                font-family: PingFang SC;
                font-weight: 500;
                color: #ffffff;
                line-height: 20px;
                text-align: center;
                position: relative;
                top: -2px;
              }

              .commodity_type1 {
                background: #2CCE30;
              }

              .commodity_type2 {
                background: #FDA95E;
              }
            }

            .price {
              /*height: 75px;*/
              background: #fafafa;
              margin-top: 20px;

              padding: 10px 10px;

              .are {

                font-size: 22px;
                font-family: PingFang SC;
                font-weight: bold;
                color: #E93030;
                margin-bottom: 10px;

                .proposal {
                  margin-left: 25px;
                  font-size: 14px;
                  font-family: PingFang SC;
                  font-weight: 500;
                  color: #666666;
                }
              }

              .money {

                font-size: 14px;
                font-family: PingFang SC;
                font-weight: 500;
                color: #000000;


              }
            }
            .address {
              display: flex;
              justify-content: space-between;
              align-self: center;

              .titl {
                width: 120px;
                line-height: 40px;
              }

              .addre {
                /deep/ .el-col {
                  .el-select {
                    margin-right: 13px;
                    width: 30%;
                  }
                }
              }
            }

            .type {
              width: 482px;
              margin: 0 auto;
              margin-top: 20px;
              display: flex;
              cursor: pointer

            }
          }

          .recommend {
            width: 120px;
            height: 100%;
            // background-color: aquamarine;
            float: left;

            .recommend_title {
              height: 55px;
              background: #e5e5e5;
              font-weight: 500;
              color: #000000;
              text-align: center;
              line-height: 55px;
            }

            .recommend_swiper {
              width: 100%;
              height: 480px;
              // background-color: #606266;
              .gallery-right {
                width: 100%;
                height: 100%;
                box-sizing: border-box;
                // padding: 10px 0;
              }

              .gallery-right .swiper-slide {
                width: 118px !important;
                height: 115px !important;
                // margin-right: 20px !important;
                background: #ffffff;
                border: 1px solid #e5e5e5;
                cursor: pointer;
                text-align: center;
                display: flex;
                flex-direction: column;
                align-items: center;
                align-content: space-around;
                justify-content: space-around;
                font-size: 8px;
                font-weight: 500;
                color: black;

                .bg_img {
                  width: 60px;
                  height: 78px;
                  /*background-color: #3a61ca;*/
                  background-size: 100% 100%;
                }

                span {
                }
              }

              .gallery-right .swiper-slide-right-active {
                width: 100%;
                height: 117px;
                // margin-right: 20px;
              }
            }

            .recommend_button {
              margin-top: 5px;
              width: 100%;
              height: 28px;
              margin: 0 auto;
              line-height: 28px;

              .button_main {
                width: 60px;
                height: 100%;
                margin: 0 auto;
                display: flex;
                justify-content: space-between;
                align-items: center;
                cursor: pointer;

                .recommend_button_prev {
                  background-image: url('../../assets/img/index/toparrow.png');
                  background-repeat: no-repeat;
                  background-position: 6px 8px;

                }

                .recommend_button_prev:hover {
                  background-image: url('../../assets/img/index/upbai.png');
                  background-position: 4px 7px;
                }

                .recommend_button_next {
                  background-image: url('../../assets/img/index/dounarrow.png');
                  background-repeat: no-repeat;
                  background-position: 6px 9px;
                }

                .recommend_button_next:hover {
                  background-image: url('../../assets/img/index/dowbai.png');
                  background-position: 4px 8px;
                }

                div {
                  width: 20px;
                  height: 20px;
                  border-radius: 50%;
                  text-align: center;
                  line-height: 20px;
                  color: #ffffff;
                  background: #E5E5E5;
                }

                div:hover {
                  background-color: rgba(0, 0, 0, 0.5);
                }
              }
            }
          }
        }
      }

      .displa_info {
        position: relative;
        width: 1020px;
        // margin-top: 20px;
      }
    }
  }

  .type_name {
    // float: left;
    width: 66px;
  }

  .type_content {
    width: 416px;
    display: flex;
    flex-wrap: wrap;
    margin-top: -10px;

    .type_info {
      min-width: 74px;
      height: 24px;
      background: #ffffff;
      border: 1px solid #e5e5e5;
      border-radius: 5px;
      line-height: 24px;
      text-align: center;
      // float: left;
      margin-left: 14px;
      font-size: 12px;
      margin-top: 10px;
    }

    .disabled {

      border: 1px solid #EEEEEE;
      background-color: #EEEEEE;

    }

    .act {
      color: #E93030;
      border: 1px solid #E93030;
    }
  }

  .number_name {
    float: left;
    width: 66px;
    height: 40px;
    line-height: 40px;
  }

  .number_info {
    width: 95px;
    height: 40px;
    background: #ffffff;
    margin-left: 14px;
    float: left;
    line-height: 40px;

    span {
      margin-left: 4px;
      font-size: 12px;
    }
  }

  .num {
    width: 36px;
    height: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    text-align: left;
    line-height: 40px;
    float: left;
    padding-left: 8px;
  }

  .add_reduce {
    position: relative;
    width: 24px;
    height: 100%;
    float: left;
    margin-left: 4px;
    text-align: center;
    cursor: pointer;

    div {
      height: 16px;
      width: 16px;
      background: #ffffff;
      border: 1px solid #e5e5e5;
      border-radius: 2px;
      line-height: 16px;
    }

    .reduce {
      margin-top: 7px;
    }
  }

  .kc {
    height: 40px;
    line-height: 40px;
  }

  .link-top {
    width: 482px;
    height: 1px;
    border-top: solid #eeeeee 1px;
    margin-top: 20px;
  }

  .total_price {
    width: 482px;
    margin: 0 auto;
    margin-top: 40px;
  }

  .zj {
    font-family: PingFang SC;
    font-weight: bold;
    font-size: 22px;
    color: #e93030;
  }

  .yf {
    margin-left: 13px;
    display: flex;
  }

  .purchase {
    position: relative;
    width: 482px;
    margin: 0 auto;
    margin-top: 15px;
    cursor: pointer
  }

  .dg {
    width: 130px;
    height: 44px;
    background: #e93030;
    border-radius: 22px;
    font-size: 16px;
    font-family: PingFang SC;
    font-weight: 500;
    color: #ffffff;
    line-height: 44px;
    text-align: center;
    float: left;
  }

  .dgx {
    background: rgba(#666666, 0.5);
    width: 130px;
    height: 44px;
    border-radius: 22px;
    font-size: 16px;
    font-family: PingFang SC;
    font-weight: 500;
    color: #ffffff;
    line-height: 44px;
    text-align: center;
    float: left;
  }

  .dg:hover {
    background: rgba(#e93030, 0.8);
  }

  .jhdx {
    width: 130px;
    height: 42px;
    background: rgba(#666666, 0.5);

    border-radius: 22px;
    float: left;
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 44px;
    text-align: center;
    margin: 0 11px 0 11px;

    img {
      margin-right: 5px;
      margin-top: -4px;
      content: url("../../assets/img/shopping.png");
      width: 16px;
      height: 16px;
    }
  }

  .jhd {
    width: 130px;
    height: 42px;
    /*background-color: rgba(254, 243, 243, 0.7);*/
    border: 1px solid #e93030;
    border-radius: 22px;
    float: left;
    font-size: 16px;
    font-weight: 500;
    color: #e93030;
    line-height: 44px;
    text-align: center;
    margin: 0 11px 0 11px;

    img {
      margin-right: 5px;
      margin-top: -4px;
    }

  }

  .jhd:hover {
    background-color: rgba(254, 243, 243, 1);
  }

  #zdj {
    float: left;
    height: 44px;
    line-height: 44px;
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    color: #000000;
    padding-left: 17px;
    background-image: url('../../assets/img/index/zuidijia.png');
    background-repeat: no-repeat;
    background-position: 0px 15px;
    margin-left: 20px;

  }

  div.tab {
    width: 1020px;
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #ffffff;
    height: 44px;

  }

  div.tab button {
    background-color: inherit;
    width: 130px;
    height: 44px;
    text-align: center;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;

    font-size: 17px;
  }

  div.tab button:hover {
    background-color: #fafafa;
  }

  div.tab button.active {
    background: #ffffff;
    border: 2px solid #3a61ca;
    color: #3a61ca;
  }

  .tabcontent {
    width: 100%;
    background: #fff;
    border-top: none;

    .tabcontentTitle {
      height: 44px;
      line-height: 44px;
      border: 1px solid #E5E5E5;
      color: #000000;
      font-size: 16px;
      padding-left: 33px;
    }
  }

  .show {
    display: block;
  }

  #one {
    padding-top: 20px;

    .shopDetails {
      text-align: center;

      img {
        width: 100% !important;
      }
    }
  }

  #two {
    margin: 20px 0;

    .show-notes-text {
      padding: 15px 35px;

      p {
        margin-bottom: 15px;
      }
    }
  }


  .transition_test {
    text-align: left;
    padding-bottom: 300px;
  }

  .add_img_js {
    width: 60px;
    height: 60px;
    position: absolute;
    transition: all 1s;
    border-radius: 60px;
  }
  .actv{
    color: #FC554C;
    border: 1px solid #FC554C !important;
  }
</style> -->

<style class="scss" scoped>
    .mall-layout-main {
        min-height: calc(100vh - 200px);
        margin: 0 auto;
        padding-top: 24px;
        background-color: #fff !important;
    }
    
    .goodDetail_detail {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        width: 1280px;
        margin: 0 auto;
        background-color: #fff;
    }
    
    .Classify_classify {
        display: flex;
        padding-top: 15px;
        color: #666;
        font-size: 12px;
        line-height: 17px;
    }
    
    .ant-spin-nested-loading {
        position: relative;
    }
    
    .ant-spin-container {
        position: relative;
        -webkit-transition: opacity 0.3s;
        transition: opacity 0.3s;
    }
    
    .goodDetail_detail-opt__B9Fgp {
        display: flex;
        -ms-flex-pack: justify;
        justify-content: space-between;
        width: 100%;
        padding: 15px 0 40px 0;
    }
    
    .goodDetail_detail-opt-left__hkEJv {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .pics {
        position: relative;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .pics__img_wrap {
        position: relative;
        width: 320px;
        height: 320px;
        overflow: hidden;
    }
    
    .pics-bottom {
        display: flex;
        -ms-flex-align: end;
        align-items: flex-end;
        width: 320px;
        margin-top: 12px;
    }
    
    .pics-arrow {
        display: flex;
        -ms-flex-align: center;
        align-items: center;
        -ms-flex-pack: center;
        justify-content: center;
        width: 20px;
        height: 43px;
        color: #999;
        font-size: 16px;
        font-size: 7px;
        background-color: #f6f6f6;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .left {
        width: 20px;
        height: 43px;
        background-color: #f6f6f6;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .anticon {
        display: inline-block;
        color: inherit;
        font-style: normal;
        line-height: 0;
        text-align: center;
        text-transform: none;
        vertical-align: -0.125em;
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }
    
    .pics-list-wrap {
        position: relative;
        width: 280px;
        height: 43px;
        overflow: hidden;
    }
    
    .pics-list {
        position: absolute;
        top: 0;
        left: 0;
        display: -ms-flexbox;
        display: flex;
    }
    
    .pics-list .pic-item {
        width: 43px;
        height: 43px;
        margin-left: 10px;
        cursor: pointer;
    }
    
    .pics .smallPic {
        position: relative;
    }
    
    .pic-item__img {
        width: 43px;
        height: 43px;
        border: 1px solid #eee;
    }
    
    .right {
        width: 20px;
        height: 43px;
        background-color: #f6f6f6;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .goodDetail_detail-opt-left-hot__8WZKT {
        margin-top: 20px;
        color: #999;
        font-size: 12px;
        line-height: 17px;
    }
    
    .GoodsSelect_select__A6Prg {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        width: 930px;
    }
    
    .GoodsSelect_select__title__QIpRr {
        max-width: 930px;
        overflow: hidden;
        color: #333;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-align: center;
        align-items: center;
        font-weight: bold;
        font-size: 20px;
        line-height: 28px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    
    .ant-spin-nested-loading {
        position: relative;
    }
    
    .ant-spin-container {
        position: relative;
        -webkit-transition: opacity 0.3s;
        transition: opacity 0.3s;
    }
    
    .seckill-sku {
        height: 106px;
        margin-bottom: 30px;
        background-color: #fff;
        border: 2px solid #ff3421;
        border-radius: 9px;
    }
    
    .seckill-sku-top {
        display: flex;
        -ms-flex-align: center;
        align-items: center;
        -ms-flex-pack: end;
        justify-content: flex-end;
        /* width: 100%; */
        height: 54px;
        padding: 0 18px;
        background-image: url(https://static.xyb2b.com/images/0f0caafeb7134ee4173387510008ed74.png);
        background-size: 100% 100%;
    }
    
    .GoodsSelect_select-list {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        margin: 28px 0 8px;
        font-size: 12px;
    }
    
    /deep/ .el-form-item__content {
        margin-left: 0 !important;
        height: 32px;
        line-height: 32px;
        font-size: 12px;
    }
    
    .seckill-sku-bottom {
        display: flex;
        -ms-flex-align: center;
        align-items: center;
        -ms-flex-pack: justify;
        justify-content: space-between;
        height: 48px;
        padding: 0 18px;
        font-size: 16px;
    }
    
    .seckill-sku-bottom-price .tax-txt {
        color: #666;
    }
    
    .seckill-sku-bottom-price .tax-price {
        margin-right: 8px;
        color: #f44;
        font-weight: bold;
        font-size: 18px;
    }
    
    .seckill-sku-bottom-price .tax-price .symbol {
        margin-right: 2px;
        font-size: 14px;
        font-style: normal;
    }
    
    .seckill-sku-bottom-price .org-price {
        color: #999;
        font-size: 14px;
        text-decoration: line-through;
    }
    
    .seckill-sku-bottom-stock {
        color: #999;
    }
    
    .GoodsBtn_goods-btn__fkHhw {
        display: flex;
        color: #666;
        line-height: 17px;
    }
    
    .select-item-form {
        margin-bottom: 8px;
    }
    
    /deep/.el-form-item__label {
        text-align: left;
        line-height: 32px;
        font-size: 12px;
    }
    
    .guige-btn {
        display: flex;
        height: 32px;
    }
    
    .guige-btn-item {
        height: 100%;
        margin-right: 10px;
        border: 1px solid #8f9aff;
        color: #8f9aff;
        display: flex;
        align-items: center;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 2px;
        cursor: pointer;
    }
    
    /deep/ .el-input__inner {
        height: 30px;
        line-height: 30px;
        font-size: 12px;
    }
    
    /deep/.el-cascader {
        line-height: 30px;
        border: 1px solid #ccc;
        height: 30px;
        line-height: 26px;
        font-size: 12px;
        width: 200px;
    }
    
    /deep/.el-input__icon {
        display: flex;
        align-items: center;
    }
    
    /deep/.el-cascader .el-input .el-icon-arrow-down {
        font-size: 12px;
    }
    
    /deep/.el-icon-arrow-down:before {
        height: 30px;
        line-height: 30px;
    }
    
    .GoodsSelect_delivery-desc__WoG6V {
        color: #333333;
        font-weight: bold;
    }
    
    .baozhang-box {
        display: flex;
    }
    
    .baozhang-box-item {
        background-color: #fff;
        color: #8f9aff;
        margin-right: 10px;
    }
    /* .baozhang-box-icon {
        background-color: #fff;
        color: #8f9aff;
    } */
    
    .count-form-item {
        margin: 10px 0 7px 0;
        display: flex;
        flex-flow: row wrap;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        color: rgba(0, 0, 0, 0.85);
        font-size: 14px;
        font-variant: tabular-nums;
        line-height: 1.5715;
        list-style: none;
        font-feature-settings: 'tnum', "tnum";
        margin-bottom: 24px;
        vertical-align: top;
        background-color: #f6fbfc;
        height: 56px;
        align-items: center;
    }
    
    .nub-box {
        border: 1px solid #ccc;
        margin-left: 10px;
    }
    
    /deep/.el-input-number {
        line-height: 33px;
    }
    
    /deep/.el-input-number {
        width: 140px;
    }
    
    /deep/.el-input-number .el-input__inner {
        padding-left: 60px;
    }
    
    .wholesale {
        display: flex;
        flex: 1;
        justify-content: space-between;
        align-items: center;
        margin-left: 40px;
        font-size: 14px;
    }
    
    .goodDetail_detail-info__fqY6f {
        display: flex;
        -ms-flex-pack: justify;
        justify-content: space-between;
        width: 100%;
        padding-bottom: 68px;
    }
    
    .RecommeGoods_recomme__E99RU {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        width: 187px;
    }
    
    .RecommeGoods_recomme__title__LiEXB {
        height: 32px;
        font-weight: 600;
        font-size: 16px;
        line-height: 18px;
        border-bottom: 1px solid #eee;
        color: #000;
    }
    
    .RecommeGoods_recomme-list__qgfb- {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        padding-top: 15px;
    }
    
    .ClassifyNavHotSell_hot-sell-list__u5XKI {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        height: 776px;
        margin-top: 15px;
        overflow: auto;
        background-color: #fff;
    }
    
    .smallGoodsItem:nth-child(1) {
        margin-top: 0;
    }
    
    .smallGoodsItem {
        margin-top: 15px;
    }
    
    .smallGoodsItem-item {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        padding-right: 4px;
        color: #333;
        border-bottom: 1px solid #eee;
        cursor: pointer;
    }
    
    .smallGoodsItem-item-top {
        display: flex;
        -ms-flex-align: center;
        align-items: center;
    }
    
    .lazyload-wrapper {}
    
    .smallGoodsItem-item-info {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        -ms-flex-pack: justify;
        justify-content: space-between;
        height: 63px;
        line-height: 16px;
    }
    
    .smallGoodsItem-item-info-title {
        display: -webkit-box;
        height: 32px;
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .smallGoodsItem-item-info-price {
        margin-bottom: 5px;
        color: #FF4444;
        font-weight: bold;
        line-height: 12px;
    }
    
    .DetailInfo_detail-info__IYg6w {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        width: 930px;
    }
    
    .DetailInfo_detail-info-list__SX86c {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .DetailInfo_detail-info-item__GhmeQ {
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        margin-top: 35px;
    }
    
    .DetailInfo_detail-info-item__title__hY5u1 {
        display: flex;
        -ms-flex-align: center;
        align-items: center;
        color: #333;
        font-weight: bold;
        font-size: 14px;
    }
    
    .GoodsAttr_attr__pkPqn {
        margin-top: 25px;
    }
    
    .GoodsAttr_attr-list__8Qg55 {
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    
    .GoodsAttr_attr-item__m5sgz {
        display: flex;
        -ms-flex-align: center;
        align-items: center;
        width: 370px;
        margin-bottom: 18px;
        color: #333;
        font-size: 12px;
        line-height: 17px;
    }
    
    .GoodsAttr_attr-item__title__M9FQN {
        width: 100px;
        color: #999;
    }
    
    .GoodsAttr_attr-item-custom__Fq1gp {
        width: 260px;
        word-break: break-word;
    }
    
    .rich-text-component {
        box-sizing: border-box;
        width: 1000px;
        max-width: 100%;
        min-height: 100%;
        margin: 25px auto 0;
        padding: 0 20px;
        overflow: hidden;
        background-color: #fff;
        border-right: solid 1px #eee;
        border-left: solid 1px #eee;
    }
    
    .DetailInfo_detail-info__IYg6w-text {
        height: 48px;
        display: flex;
        border-bottom: 2px solid #ccc;
        width: 100%;
        align-items: center;
        font-size: 16px;
    }
    
    .act-one {
        font-size: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-right: 15px;
        cursor: pointer;
    }
    
    .actcolor {
        color: #000;
        font-weight: 700;
    }
    
    .bor-bot {
        margin-top: 4px;
        width: 30px;
        height: 2px;
        background-color: #656efe;
    }
    
    .recommendPage {
        position: relative;
        margin-top: 20px;
        .swiper-wrapper {
            width: 229px;
        }
        .swiper-slide {
            height: 47px;
        }
        .swiper-button-next {
            right: 0;
        }
        .swiper-button-prev {
            left: 0;
        }
        .swiperActive {
            border: 2px solid #007aff;
        }
    }
    
    /deep/.magnifier-box img[data-v-546a21cf] {
        width: 100%;
        height: 100% !important;
    }
    
    .swiper-left {
        position: absolute;
        top: 50%;
        width: calc(var(--swiper-navigation-size) / 44 * 27);
        height: var(--swiper-navigation-size);
        margin-top: calc(-1 * var(--swiper-navigation-size) / 2);
        z-index: 10;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--swiper-navigation-color, var(--swiper-theme-color));
        background-color: #f6f6f6;
        color: #ccc;
    }
    
    .Count_sku-count-price__9-Y5u {
        -ms-flex-align: baseline;
        align-items: baseline;
        font-size: 14px;
        font-family: PingFangSC-Semibold, PingFang SC;
        color: #333333;
        float: left;
        margin-left: 24px;
        display: -ms-flexbox;
        display: flex;
        height: 32px;
    }
    
    .Count_sku-count-price-all__Uh {
        margin-top: 0px;
        color: #FF4444;
        font-size: 20px;
        margin-right: 24px;
        font-weight: 600;
    }
    
    .type {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .type_content {
        display: flex;
    }
    
    .type_name {
        width: 80px;
        height: 32px;
        line-height: 32px;
    }
    
    .type_info {
        min-width: 74px;
        height: 24px;
        background: #ffffff;
        border: 1px solid #e5e5e5;
        border-radius: 5px;
        line-height: 24px;
        text-align: center;
        font-size: 12px;
        margin-right: 10px;
    }
    
    .disabled {
        border: 1px solid #EEEEEE;
        background-color: #EEEEEE;
    }
    
    .act {
        color: #E93030;
        border: 1px solid #E93030;
    }
    
    .address {
        display: flex;
        margin-bottom: 10px;
        /* justify-content: space-between; */
        /* align-self: center; */
        .titl {
            width: 80px;
            line-height: 32px;
        }
        .addre {
            /* border: 1px solid #ccc;
            margin-right: 13px; */
        }
    }
    
    /deep/.el-select {
        border: 1px solid #ccc;
        margin-right: 14px;
    }
    
    .show-notes-text {
        padding: 15px 35px;
        p {
            margin-bottom: 15px;
        }
    }
    
    .dgx {
        background: #666666;
        width: 130px;
        height: 44px;
        border-radius: 22px;
        font-size: 16px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #ffffff;
        line-height: 44px;
        text-align: center;
        float: left;
    }
    /* .nobox {
        display: flex;
        align-items: center;
        justify-content: center;
    } */
</style>